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: <1156855700.6271.104.camel@localhost.localdomain>
Date:	Tue, 29 Aug 2006 13:48:20 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Nicholas Miell <nmiell@...cast.net>,
	Richard Knutsson <ricknu-0@...dent.ltu.se>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	James.Bottomley@...elEye.com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: Conversion to generic boolean

Ar Maw, 2006-08-29 am 12:41 +0100, ysgrifennodd Christoph Hellwig:
> gcc lets you happily assign any integer value to bool/_Bool, so unless
> you write sparse support for actually checking things there's not the
> slightest advantage in value range checking.

Not the case: gcc allows you to assign 0 or 1 to an _Bool type object.
When you are "assigning" integers you are merely seeing implicit casting
before the assignment.

Try   int a = 4; _Bool b = a; int c = b; printf("%d\n", c);

Alan

-
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