This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
may be undefined operation warning
- From: "Wesley Smith" <wesley dot hoke at gmail dot com>
- To: "MSX to GCC" <gcc-help at gcc dot gnu dot org>
- Date: Sun, 24 Feb 2008 19:31:52 -0800
- Subject: may be undefined operation warning
Hi,
I'm wondering why GCC is giving a warning "operation on 'c' may be
undefined"? Here's the code:
#define MAX_CHAR(data, accum) ((255 - (data)) > (accum)) ? ((accum) +
(data)) : 255
uchar *c;
uchar accum
c = out_pix + (voffset - *cp++)*out_rowstride;
*c++ = MAX_CHAR(*c, accum); ///<------------- warning on this line
This is in a C file with
gcc -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic
--program-prefix= --host=i686-apple-darwin8
--target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
Any ideas? Thanks,
wes