This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc 2.95.2 PPC code generation bug(New version!)


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]