NULL used in arithmetic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following code compiles without warning using g++ version 4.2.1, but I
get a warning "NULL used in arithmetic" with version 4.3.3.  Is the code
wrong or is the compiler wrong?

================================
#include <stddef.h>

class FooClass
{
};

typedef void (FooClass::*foo_type)(void);

int foo(foo_type x)
{
    return x != NULL;
}
================================

   Michael


      

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux