
* mln/data/memcpy_.hh (mln::data::impl::memcpy_): Here. --- milena/ChangeLog | 6 ++++++ milena/mln/data/memcpy_.hh | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 118ff21..fc516e7 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,9 @@ +2009-10-06 Roland Levillain <roland@lrde.epita.fr> + + Warn about a bug in memcpy_ with g++ 4.2 on Debian for IA-32. + + * mln/data/memcpy_.hh (mln::data::impl::memcpy_): Here. + 2009-10-02 Guillaume Lazzara <z@lrde.epita.fr> Small fixes in documentation. diff --git a/milena/mln/data/memcpy_.hh b/milena/mln/data/memcpy_.hh index 5ce2168..77701b2 100644 --- a/milena/mln/data/memcpy_.hh +++ b/milena/mln/data/memcpy_.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -88,6 +89,16 @@ namespace mln return; } + /* FIXME: Careful, the code generated for this function by g++ + 4.2 with high a optimization level (`-O3') and without + `-fno-strict-aliasing' might be wrong (at least with + Debian's g++ 4.2 on IA-32)! Note that Debian's g++ 4.0, + 4.1, 4.3 and 4.4 are fine. */ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) +# if __GNUC__ == 4 && __GNUC_MINOR__ == 2 +# warning The code generated by g++ 4.2 on Debian GNU/Linux 5.0 for IA-32 for this function might be wrong. +# endif +#endif if (sizeof(mln_value(Id)) == 1) { std::memcpy((void*) (&dest.val()), // violent casts -- 1.6.3.1