gcc 2.95.2 PPC code generation bug(New version!)

root root@enzo.bigblue.local
Mon May 1 11:13:00 GMT 2000


On Fri, 28 Apr 2000, Ralph Schmidt wrote:

> > The patch by Mark fixed the problem for the specific test case
> but it doesn't fix the problem in a bigger scope.
>
> Please take my first bugreport and look at the generated code
> to see where the problem is.

But your first bugreport was buggy itself and I told you that. You have to 
change your macros to produce valid statement expressions. Your original 
macros produced sth like that:

  int result = ({
       struct test mytest;
       ({
           int testi;
           testi = func (&mytest);
           testi;
       })
  });

You expect TESTI to be assigned to RESULT, but I think this is not covered by 
the definition of statement expressions in the GCC manual (at least not to my 
understanding). I believe you have to rewrite your macros to produce code 
like that:

  int result = ({
       struct test mytest;
       int testi;
       testi = func (&mytest);
       testi;
  });

I don't see a reason for the extra level of braces anyway.

Franz.


More information about the Gcc-bugs mailing list