bug?

Jeffrey A Law law@cygnus.com
Sat Jul 31 23:33:00 GMT 1999


  In message < 199907091712.NAA01134@hckb-13.c.u-tokyo.ac.jp >you write:
  > 
  > When I compile and run the following program,
  > I get an unexpected result.
  > It prints
  > > -1 0
  > instead of
  > > 0 1
  > 
  > If I change N to 7, it works fine.
  > Am I missing something?
  > 
  > -------------------------------------------
  > 
  > #include <stdio.h>
  > 
  > #define N 8
  > 
  > typedef struct {
  >   int base;
  >   int form[N];
  > } frame;
  > 
  > int main()
  > {
  >   frame frame_stack[10], frames[10], *fp;
  >   int i;
  > 
  >   frame_stack[0].base = 0;
  >   frame_stack[1].base = 1;
  >   fp = frames;
  >   for(i=0;i<2;++i){
  >     *fp++ = frame_stack[i];
  >   }
  >   
  >   printf("%d %d\n", frames[0].base, frames[1].base);
  >   return 0;
Unfortunately you did not file a complete bug report.  You didn't mention
what configuration shows this problem.  You did not mention what version of 
egcs you were using, nor did you mention what compile flags you used.

Please see the FAQ for help in filing a complete bug report.

jeff
  > }
  > 




More information about the Gcc-bugs mailing list