Please see below my colleague response.
From: Tom Wiggins
Sent: 28 March 2011 10:25
To: Chris Stylianou
Subject: Boost debugging
Hi Chris,
I tried running the same build command with the “g++ -E” option. The error line gets turned into:
ESU = 2, EAST_SOUTH_UP = 2, 2 = 2, EAST_SOUTH = 2, FLIP_Y = 2,
Obviously ES is being defined to 2 from somewhere else.
The error does not get fixed if we #undef ES before the #include of “polygon.hpp” in the “main.cc” file, but it does if we insert an #undef directly before the declaration of the enum in “polygon.hpp” itself. (with no other errors reported)
On further inspection (and checking the GCC debug output options) it looks like that it is being defined in “/usr/include/sys/regset.h”
77 /*
78 * The names and offsets defined here are specified by i386 ABI suppl.
79 */
80
81 #define SS 18 /* only stored on a privilege transition */
82 #define UESP 17 /* only stored on a privilege transition */
83 #define EFL 16
84 #define CS 15
85 #define EIP 14
86 #define ERR 13
87 #define TRAPNO 12
88 #define EAX 11
89 #define ECX 10
90 #define EDX 9
91 #define EBX 8
92 #define ESP 7
93 #define EBP 6
94 #define ESI 5
95 #define EDI 4
96 #define DS 3
97 #define ES 2
98 #define FS 1
99 #define GS 0
Kind regards,
Tom