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]
Date:	Sun, 21 Sep 2008 09:09:21 -0700
From:	Ben Pfaff <blp@...stanford.edu>
To:	linux-kernel@...r.kernel.org
Cc:	linux-serial@...r.kernel.org
Subject:  Re: [PATCH] max3100 driver

Arjan van de Ven <arjan@...radead.org> writes:

> I do have a question though: what does a signed bitfield of 1 mean?
> I mean.. the variables are "int", so signed.... where will the compiler
> store the sign bit???

Whether a bit-field declared as type "int" is signed or unsigned
is compiler implementation-defined.  As C99 6.7.2 says (there is
similar text in C89):

     ...for bit-fields, it is implementation-defined whether the
     specifier int designates the same type as signed int or the
     same type as unsigned int.

Thus, it is never a good idea to declare a bit-field as plain
"int".  Declare it as "signed int" or "unsigned int" instead.
-- 
"Mon peu de succès près des femmes est toujours venu de les trop aimer."
--Jean-Jacques Rousseau

--
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