home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17361 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  2.2 KB

  1. Path: sparky!uunet!oracle!unrepliable!bounce
  2. Newsgroups: comp.sys.amiga.programmer
  3. From: dnavas@oracle.uucp (David Navas)
  4. Subject: Re: Bug in SAS/C V6.1?
  5. Message-ID: <1992Dec15.003553.23198@oracle.us.oracle.com>
  6. Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
  7. Nntp-Posting-Host: mailseq.us.oracle.com
  8. Organization: Oracle Corporation, Redwood Shores CA
  9. References: <S37732V.92Dec11104414@lk-hp-12.hut.fi> <Bz3nvr.82D@unx.sas.com>
  10. Distribution: comp
  11. Date: Tue, 15 Dec 1992 00:35:53 GMT
  12. X-Disclaimer: This message was written by an unauthenticated user
  13.               at Oracle Corporation.  The opinions expressed are those
  14.               of the user and not necessarily those of Oracle.
  15. Lines: 38
  16.  
  17. In article <Bz3nvr.82D@unx.sas.com> jamie@cdevil.unx.sas.com (James Cooper) writes:
  18. >>struct MyStruct default_mystruct = {
  19. >>       ~0
  20. >>};
  21. >>-----------------------------------------------------------
  22. >>SAS/C gives me a warning in a line containg ~0, saying something
  23. >>like that I can`t init unsigned short to -1. Okey, I understand that
  24. >>it ~0 means the same as -1 but if I have wanted to use signed numbers
  25. >>I would have specified it as -1.
  26.  
  27. >This is just the compiler trying to keep you out of trouble.  :-)
  28.  
  29. I'd like to go on record as saying that this sucks :)
  30.  
  31. Really, ~0 is NOT the same thing as -1.  Not -all- computers in existance
  32. are two's complement, you know -- and the symbols mean something different
  33. too.  Had I meant -1, I'd say -1, had I mean ~0, I'll say ~0.  Having to
  34. cast ~0 back to an unsigned state is, well, icky....
  35.  
  36. Would you at least be kind enough to make ~0x0 be unsigned?
  37.  
  38. [I don't like this behaviour..mumble..mumble..mumble..I really don't like it]
  39.  
  40. Alternatively, if it isn't a separate warning from the "unsigned junk = -1"
  41. warning, make it so, and then I'll shut this warning off.
  42.  
  43. >Since you are sure you want to do this, just add a type-cast to tell the
  44. >compiler you really meant it, and it will not warn you anymore.
  45.  
  46. Key concept -- C isn't supposed to look like Cobol. ;)  Thank you.  [Grant me
  47. a good natured exaggeration here.]
  48. Next you'll be telling me to put "I_MEAN_IT_REALLY  +*@ I_KID_YOU_NOT" in front
  49. of every semicolon ;(
  50.  
  51. Repeat mumbling....
  52.  
  53. David C. Navas                        dnavas@oracle.com
  54. Working for, but not speaking on behalf of, Oracle Corp.
  55.