Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index



On Fri, 2011-04-01 at 18:27 +0200, Lubos Lunak wrote:
    sal_True is -1

 What makes you think so (besides possibly today's date, but then the rest of 
your mail looks ok) ?

        ;-) you know, I have no idea - someone told me that the other day & I
foolishly believed it (I guess).

    - which is great for unsigned bit fields and all that - 

 Not really important, but you lost me there.

        struct A { int b : 1; }

        b can be zero or minus one; the one bit is the sign ;-)

 Actually, converting to bool would have probably avoided any such possible 
trouble, as converting to bool converts any non-zero to true (which has the 
value of 1 with gcc, although I'm not quite sure the spec mandates this).

        So the risk is fairly small then; nevertheless it seems more or less
retarded to allow other states lurking around in our booleans :-)

        Thanks,

                Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.