This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: may be undefined operation warning


>  >  >  c =  out_pix + (voffset - *cp++)*out_rowstride;
>  >  >  *c++ = MAX_CHAR(*c, accum);  ///<------------- warning on this line
>  >
>  >  The first store to *c happens after the load on the RHS of the assignment.
>  >
>
>  Thanks,
>  Perhaps I should have mentioned that before this is called (which is
>  in a tight for loop), I zero out the entire block of memory.  Is what
>  you mentioned causing the error or were you just pointing out a
>  potential coding error?


Argghh.  I just noticed I didn't post the macro like I thought I had:

#define MAX_CHAR(data, accum)	((255 - (data)) > (accum)) ? ((accum) +
(data)) : 255

wes


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