Comment 1 for bug 19120

Revision history for this message
Matthias Klose (doko) wrote :

reassign 288748 libc6-dev
thanks

As the memset line in question, although ugly, is valid ANSI C,
I suspect this is a bug in the definition of the macro memset.

After protecting the arguments to the macro __memset_1 in
/usr/include/bits/string2.h, it compiled fine.

--- string2.h.orig 2005-01-05 20:34:29.000000000 +0100
+++ /usr/include/bits/string2.h 2005-01-05 20:34:33.000000000 +0100
@@ -106,7 +106,7 @@
        : memset (s, c, n))))

 # define __memset_1(s, c) ({ void *__s = (s); \
- *((__uint8_t *) __s) = (__uint8_t) c; __s; })
+ *((__uint8_t *) __s) = (__uint8_t) (c); __s; })

 # define __memset_gc(s, c, n) \
   ({ void *__s = (s); \