Re: [AD] another FAQ?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
> On my system, the attached Q&A applies.  I'd like to know if it
> applies on other systems too.  I tried with 3.9.36, 3.9.37, and
> current CVS.

This doesn't seem to be a problem with recent CVS + djgpp version:

   c:\>gcc -v
   Using builtin specs.
   gcc version 2.95.2 19991024 (release)

At least, unless I misunderstood something. Do you mean that the problem
seems to be that `volatile' doesn't work for arrays? Have you tested the
minimal example:

   extern volatile int x[];
   void foo(void)
   {
      while (x[2])
         ;
   }

With "gcc -O2 --save-temps", this should produce something like:

   [snip]
   L5:
      movl _x+8,%eax
      testl %eax,%eax
      jne L5
   [snip]

> $ gcc -v
> Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs
> gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)

Hmm, isn't this that infamous beta version that they shipped by accident
with some linux distro? Maybe it's only a problem with this version? Of
course that wouldn't make it inappropriate for a faq, but if it is true
maybe we could also mention that upgrading gcc is an option (though
yielding timeslices is also a Good Thing IMO).

Sven



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/