On Wed, Nov 23, 2011 at 12:27:20PM +0100, Jan Holesovsky wrote:
On 2011-11-22 at 17:52 +0100, Lionel Elie Mamane wrote:
Kendy, would you consider having your MinGW tinderbox compile with
-std=c++0x or -std=gnu++0x? That would ensure coverage of Windows-only
code.
I tried, but there were several places that were broken. After I found
out that M_PI is not defined when you build with -std=c++0x, I kind of
lost interest for now ;-)
$ cat foo.c
#include <math.h>
$ g++-4.4 -std=c++0x -E -dM foo.c|grep 'M_PI '
#define M_PI 3.14159265358979323846
$ /usr/bin/i586-mingw32msvc-g++ -std=c++0x -E -dM foo.c|grep 'M_PI '
$
Sneaky, sneaky. Apparently, it is a bug that it is defined in *any*
strict ANSI/ISO mode, be it C or C++. Related to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11196
But for this particular issue, note:
$ /usr/bin/i586-mingw32msvc-g++ -std=gnu++0x -E -dM foo.c|grep -i 'M_PI '
#define M_PI 3.14159265358979323846
So maybe you would have more luck with "-std=gnu++0x" than with
"-std=c++0x"?
--
Lionel
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.