[Freeciv-Dev] Re: (PR#8648) Bool and type related cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >
Raimar Falke wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >
>
> On Sun, May 02, 2004 at 02:56:51AM -0700, Marko Lindqvist wrote:
>
>><URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >
>>
>>Raimar Falke wrote:
>>
>>
>>>Found by splint.
>>>
>>>Highlight:
>>>- return FALSE;
>>>+ return NULL;
>>>
>>>I wonder why this wasn't found by gcc.
>>>
>>
>> Both are preprocessor macros with same definition: '0'. (For some
>>systems NULL is defined as '(void) 0', though) Actual compiler never
>>sees them.
>
>
> The compiler should bring a warning if I want to use "0" (aka FALSE)
> as a pointer.
>
It would be nice, but simply don't work. You have to be able to use
NULL as pointer, and it _too_ is "0".
> grep -r "#define NULL" /usr/include/
- Caz
|
|