microblaze getchar() not functioning properly
Michael Eager
eager@eagerm.com
Wed Jul 27 15:03:00 GMT 2011
On 07/27/2011 04:57 AM, naga raj wrote:
> Hi Andrew,
>
> Thanks for you reply. I am sorry I forgot to add j++ while posting.
Before posting code to gcc-help, please make sure that it is the
code that shows the problem. It wastes everyone's time to look
at code which you didn't test and which doesn't show the problem
you want help with.
> I tried to print variable 'j' after getchar() function in code. Then
> for each character I enter 'j' value is incremented by two.
Post the code which actually failed, after you have verified the failure.
Look at the assembly generated by gcc. Where is j incremented?
Why do you think that this is a problem in getchar()?
Does the test case fail (i.e., increment j twice) without getchar()?
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Gcc-help
mailing list