This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 89 | Differences between
and this patch

Collapse All | Expand All

(-)a/Eigen/src/Core/util/Macros.h (-2 / +7 lines)
Lines 119-137 Link Here
119
#ifdef EIGEN_NO_DEBUG
119
#ifdef EIGEN_NO_DEBUG
120
#define eigen_assert(x)
120
#define eigen_assert(x)
121
#else
121
#else
122
#define eigen_assert(x) assert(x)
122
#define eigen_assert(x) assert(x)
123
#endif
123
#endif
124
#endif
124
#endif
125
125
126
#ifdef EIGEN_INTERNAL_DEBUGGING
126
#ifdef EIGEN_INTERNAL_DEBUGGING
127
#define eigen_internal_assert(x) eigen_assert(x)
127
  #if __GNUC__==4 && __GNUC_MINOR__==3
128
    #error EIGEN_INTERNAL_DEBUGGING triggers GCC 4.3 bugs that make your program segfault. Either don't use EIGEN_INTERNAL_DEBUGGING, or don't use GCC 4.3. See bug 89.
129
    #define eigen_internal_assert(x)
130
  #else
131
    #define eigen_internal_assert(x) eigen_assert(x)
132
  #endif
128
#else
133
#else
129
#define eigen_internal_assert(x)
134
  #define eigen_internal_assert(x)
130
#endif
135
#endif
131
136
132
#ifdef EIGEN_NO_DEBUG
137
#ifdef EIGEN_NO_DEBUG
133
#define EIGEN_ONLY_USED_FOR_DEBUG(x) (void)x
138
#define EIGEN_ONLY_USED_FOR_DEBUG(x) (void)x
134
#else
139
#else
135
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
140
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
136
#endif
141
#endif
137
142
(-)a/test/main.h (+4 lines)
Lines 157-173 namespace Eigen Link Here
157
157
158
#else // EIGEN_NO_ASSERTION_CHECKING
158
#else // EIGEN_NO_ASSERTION_CHECKING
159
159
160
  #define VERIFY_RAISES_ASSERT(a) {}
160
  #define VERIFY_RAISES_ASSERT(a) {}
161
161
162
#endif // EIGEN_NO_ASSERTION_CHECKING
162
#endif // EIGEN_NO_ASSERTION_CHECKING
163
163
164
164
165
// bug 89: EIGEN_INTERNAL_DEBUGGING causes weird strict-aliasing issues with GCC 4.3
166
#if !(__GNUC__==4 && __GNUC_MINOR__==3)
165
#define EIGEN_INTERNAL_DEBUGGING
167
#define EIGEN_INTERNAL_DEBUGGING
168
#endif
169
166
#include <Eigen/QR> // required for createRandomPIMatrixOfRank
170
#include <Eigen/QR> // required for createRandomPIMatrixOfRank
167
171
168
172
169
static void verify_impl(bool condition, const char *testname, const char *file, int line, const char *condition_as_string)
173
static void verify_impl(bool condition, const char *testname, const char *file, int line, const char *condition_as_string)
170
{
174
{
171
  if (!condition)
175
  if (!condition)
172
  {
176
  {
173
    std::cerr << "Test " << testname << " failed in " << file << " (" << line << ")" \
177
    std::cerr << "Test " << testname << " failed in " << file << " (" << line << ")" \

Return to bug 89