3 msgNeed help with optimization options
2 msgstrict aliasing rule and examples
4 msgAnother question. How can I dump gimple IR afte...
4 msgrunning library built in gcc 3.4 on another lin...
1 msgHow to instrument an initcall?
1 msgconst array warning question
3 msgg++ 4.2.x x86: code generation for __sync_lock_...
1 msgHow to traverse through all type declarations i...
2 msgdata base calls

may be undefined operation warning
\ Wesley Smith (25 Feb 2008)
. \ Diego Novillo (25 Feb 2008)
. . \ Wesley Smith (25 Feb 2008)
. . . \ Wesley Smith (25 Feb 2008)
. . . \ Diego Novillo (25 Feb 2008)
. . . . \ Wesley Smith (25 Feb 2008)
. . . . . \ Diego Novillo (25 Feb 2008)
. . . . . . \ Wesley Smith (25 Feb 2008)
. . . . . . . \ Diego Novillo (25 Feb 2008)
. \ John Love-Jensen (25 Feb 2008)
. . \ Diego Novillo (25 Feb 2008)

2 msgnon virtual dtor warning
3 msggcc-3.4.3 and libstdc++.so.(5|6)
1 msgMigrating from gcc 2.95.3 to 3.4.5 in vxWorks o...
5 msgTarget specific behaviour
4 msgFunction Lookup
6 msginlined functions and ABI guarantees
2 msgCannot compile GCC on Ubuntu 7.10 x86_64
3 msgC main 32/64 bit prologues differ
4 msgForce generation of an uncalled method?
5 msggcc 3.2
Subject:may be undefined operation warning
Group:Gcc-help
From:Wesley Smith
Date:25 Feb 2008


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


© 2004-2008 readlist.com