Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #17237

Re: Is this broken or wot?

From Willem <willem@toad.stack.nl>
Newsgroups comp.lang.c
Subject Re: Is this broken or wot?
Date 2012-02-13 19:19 +0000
Organization Stack Usenet News Service
Message-ID <slrnjjioiv.2g8t.willem@toad.stack.nl> (permalink)
References <jhbm7t$9ng$1@speranza.aioe.org>

Show all headers | View raw


Robert Samelson wrote:
) unsigned x = 0;
) if(x-- < 4)
)                 printf("foo\n");
) else
)                 printf("bar\n");
)
) GCC for Data General Aviion 5000 (an 88000 machine) will convert this 
) into:
)
)         unsigned x = 0;
)         if(--x < 3) ....

That doesn't look like assembly to me.
I assume this is your 'decompiling' of the actual assembly instructions.
It means that there either is a fault in the compiler's compilation, or
in your decompilation.  Without information on what the actual assembly
instructions are, it's hard to say which it is.

) in the assembly.
)
) This seems broken if x == ~0.

You should test what the actual output from the code is, to see if it
does what it's supposed to.


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is this broken or wot? Robert Samelson <robs@invalid.com> - 2012-02-13 18:53 +0000
  Re: Is this broken or wot? Willem <willem@toad.stack.nl> - 2012-02-13 19:19 +0000
  Re: Is this broken or wot? Barry Schwarz <schwarzb@dqel.com> - 2012-02-13 12:14 -0800
    Re: Is this broken or wot? James Kuyper <jameskuyper@verizon.net> - 2012-02-13 15:40 -0500
  Re: Is this broken or wot? Keith Thompson <kst-u@mib.org> - 2012-02-13 12:59 -0800
  Re: Is this broken or wot? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-13 14:30 -0800
    Re: Is this broken or wot? "Bl0ckeduser ." <bl0ckedusersoft@gmail.com> - 2012-02-13 18:13 -0800

csiph-web