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]

No NULL in 3.0.2???


Hi,

   This:

int main(int argc, char** argv)
{
   int* p = NULL;
}

produces this:

null.cpp: In function `int main(int, char**)':
null.cpp:3: `NULL' undeclared (first use this function)
null.cpp:3: (Each undeclared identifier is reported only once for each 
function
    it appears in.)

Isn't NULL still part of the standard?  I can't believe it'd be 
deprecated.  I'm sure there are still a lot of people who use NULL.

If NULL _is_ slated for eventual removal, I think it's still
very much alive right now.

gcc -v
Reading specs from 
/usr/local/gcc302/lib/gcc-lib/i686-pc-linux-gnu/3.0.2/specs
Configured with: /home/jdonner/mk302/gcc-3.0.2/configure 
--enable-threads=posix --prefix=/usr/local/gcc302
Thread model: posix
gcc version 3.0.2

Jeff


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