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