Discussion on IRC: [10:15] <SL__1> I do get some "variable declared but never referenced" warnings with intels composer xe 12.1 caused by definitions in Core/util/Constants.h. [10:15] <SL__1> in line 298, 303 and 308 [10:16] <SL__1> should I report a bug? [10:17] <jitse-niesen> yes, we try to get rid of all these warnings [10:17] <jitse-niesen> even better is to include a patch :) [10:19] <SL__1> I would like to so, but to me its not clear how fix them. [10:20] <SL__1> there is a comment in code which says: [10:20] <SL__1> /* the following could as well be written: [10:20] <SL__1> * enum NoChange_t { NoChange }; [10:20] <SL__1> * but it feels dangerous to disambiguate overloaded functions on enum/integer types. [10:20] <SL__1> * If on some platform it is really impossible to get rid of "unused variable" warnings, then [10:20] <SL__1> * we can always come back to that solution. [10:20] <SL__1> */ [10:24] <jitse-niesen> with GCC we use __attribute__((unused)); is there something similar for xe? [10:26] <SL__1> yeah, just saw that. I try to find out [10:28] <SL__1> I think xe also supports __attribute__((unused)) [10:28] <SL__1> I'll try [10:56] <SL__1> it supports #pragma unused [.....] [14:04] <SL__1> damn intel compiler. documentation says it supports #pragma unused, but it does not work If nobody has a better idea, I'll try following the suggestion in the code.
I changed it to "enum NoChange_t { NoChange }" which should get rid of the warning (changeset c009e74a417d).
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/450.