http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53277

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glisse at gcc dot gnu.org

--- Comment #9 from Marc Glisse <glisse at gcc dot gnu.org> 2012-05-09 11:50:09 
UTC ---
glibc still has:

#   define strspn(s, accept) \
  __extension__                                                               \
  ({ char __a0, __a1, __a2;                                                   \
     (__builtin_constant_p (accept) && __string2_1bptr_p (accept)             \
      ? ((__builtin_constant_p (s) && __string2_1bptr_p (s))                  \
         ? __builtin_strspn (s, accept)                                       \
         : ((__a0 = ((const char *) (accept))[0], __a0 == '\0')               \
            ? ((void) (s), 0)                                                 \
            : ((__a1 = ((const char *) (accept))[1], __a1 == '\0')            \
               ? __strspn_c1 (s, __a0)                                        \
               : ((__a2 = ((const char *) (accept))[2], __a2 == '\0')         \
                  ? __strspn_c2 (s, __a0, __a1)                               \
                  : (((const char *) (accept))[3] == '\0'                     \
                     ? __strspn_c3 (s, __a0, __a1, __a2)                      \
                     : __builtin_strspn (s, accept))))))                      \
      : __builtin_strspn (s, accept)); })

The lone 0 in the middle should be explicitly cast to size_t, like it is for
fread_unlocked. Could you report it to glibc please?

gcc could avoid this warning when converting a constant, I am pretty sure the
same issue (possibly with another macro) already led to such a conversation...

Reply via email to