bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19970] Cannot cast from pointer to bool using gnulib's <stdbool.h>


From: James Youngman
Subject: [bug #19970] Cannot cast from pointer to bool using gnulib's <stdbool.h>
Date: Sat, 26 May 2007 11:07:45 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2)

URL:
  <http://savannah.gnu.org/bugs/?19970>

                 Summary: Cannot cast from pointer to bool using gnulib's
<stdbool.h> 
                 Project: findutils
            Submitted by: jay
            Submitted on: Saturday 05/26/2007 at 11:07
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Nelson H. F. Beebe
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None

    _______________________________________________________

Details:

Th comments in the gnulib header say:

Limitations of this substitute, when used in a C89 environment:

- In C99, casts and automatic conversions to '_Bool' or 'bool' are
performed in such a way that every nonzero value gets converted
to 'true', and zero gets converted to 'false'.  This doesn't work
with this substitute.  With this substitute, only the values 0 and  1 give
the expected result when converted to _Bool' or 'bool'.


There are a couple of places in parser.c where we do this.  That means that
findutils does nto compile in such environments.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?19970>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]