Registered Member
|
Hello everybody,
I am trying out Eigen. When using the dense matrix class "Matrix", I am spammed by compiler warnings stating the following:
This is on Mac OS X using GCC. I saw your disable stupid warnings header file and liked the idea. So I googled for a switch to disable this warning. Apparently, there is none. The way to fix it is by casting the following way:
I don't have a bitbucket account and was too lazy to make one or I'd have made a pull request. Please, if it is a correct one, include this fix in upcoming versions. |
Moderator
|
what's your compiler version? I cannot reproduce and I don't understand how there can be any enumeral mismatch here.
|
Registered Member
|
I too was wondering how the compiler concludes to an enumeral mismatch. I guess it is because the two anonymous enums that the values (which two of the three values? I don't know) resolve to live in different classes thus it assumes they may have different storage types. But that's just a wild guess. Note that I cannot reproduce it on linux either, only on OS X (10.6). |
Moderator
|
but here all the enumerals are part of the same set of anonymous enums.... anyway gcc 4.7 is still in beta, maybe it would be worth trying on the trunk and perhaps report to them.
|
Registered Member
|
Hello,
The following change makes the warning disappear: src/Core/DenseBase.h:172 InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime) : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime), Basically, its only a matter of ensuring that all expressions have the same type in the nested conditional. HTH, max. |
Moderator
|
I still maintain this is GCC issue, and actually I've just recompiled with the last 4.7.0 version (RC?) and this warning disappeared.
|
Registered Member
|
The issue is still there with GCC 4.7.0
|
Moderator
|
yes sorry, I made a mistake when re-testing. The workaround is in the devel branch though I maintain this is a gcc issue.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]