Update of bug #18872 (project freeciv):

                 Summary: Freeciv does not compile with clang => Freeciv
gives warnings with clang toolchain

    _______________________________________________________

Follow-up Comment #5:

Re the md5.c warning: I suspect it's running into this bit of code (which is
from Solar Designer's original):


/*
 * SET reads 4 input bytes in little-endian byte order and stores them
 * in a properly aligned word in host byte order.
 *  
 * The check for little-endian architectures that tolerate unaligned
 * memory accesses is just an optimization.  Nothing will break if it
 * doesn't work.
 */
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define SET(n) 
        (*(MD5_u32plus *)&ptr[(n) * 4])
/* ... */
#else
/* ...do it properly... */
#endif


Presumably one of those symbols is defined on doctorjlowe's setup. Does the
warning go away if you change this to "#if 0"?

If so, we could avoid the warning by adding some sort of clang detection in
that #if. (Alternatively, by turning off -Wcast-align for clang, but that's
likely to be fiddlier and may hide issues we're interested in.)

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?18872>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to