lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <6A4569B5-FC04-49CA-87F5-D0595A0F41FA@mac.com>
Date:	Sun, 11 Mar 2007 21:43:25 -0400
From:	Kyle Moffett <mrmacman_g4@....com>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc:	Daniel Hazelton <dhazelton@...er.net>,
	Cong WANG <xiyou.wangcong@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: Style Question

On Mar 11, 2007, at 21:32:00, Jan Engelhardt wrote:
> On Mar 11 2007 21:27, Kyle Moffett wrote:
>> On Mar 11, 2007, at 19:16:59, Jan Engelhardt wrote:
>>> On Mar 11 2007 18:01, Kyle Moffett wrote:
>>>> On the other hand when __cplusplus is defined they define it to the
>>>> "__null" builtin, which GCC uses to give type conversion errors for
>>>> "int foo = NULL" but not "char *foo = NULL".
>
>>> I think that the primary reason they use __null is so that you can
>>> actually do[...]
>>
>> Isn't that what I said? :-D
>
> Ya. Though I was picking at
>
>> "__null" builtin, which GCC uses to give type conversion errors  
>> for "int foo = NULL"
>
> since C's (void *)0 would also barf when being assigned to int.  So  
> it's not a genuine __null feature ;-)

You chopped my sentence in half! :-D  What I *really* said was:
> ...give type conversion errors for 'int foo = NULL' but not 'char  
> *foo = NULL'.

The pseudo-standard "#define NULL (0)" that the C++ standards ask for  
does *NOT* give an error for "int foo = NULL;", and in C++ the C- 
standard "#define NULL ((void *)0)" *does* give an error for "char  
*foo = NULL;"  Ergo I think I was correct when I said "GCC uses  
[__null] to give type conversion errors for <the-first> but not <the- 
second>"

Cheers,
Kyle Moffett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ