This bugzilla service is closed. All entries have been migrated to
Bug 450 - Intel Composer XE gives "variable declared but never referenced" warning for NoChange
Summary: Intel Composer XE gives "variable declared but never referenced" warning for ...
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.1
Hardware: x86 - general All
: Normal minor
Assignee: Nobody
Depends on:
Reported: 2012-04-19 15:15 UTC by Jitse Niesen
Modified: 2019-12-04 11:36 UTC (History)
2 users (show)


Description Jitse Niesen 2012-04-19 15:15:19 UTC
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.
Comment 1 Jitse Niesen 2012-04-29 16:37:44 UTC
I changed it to "enum NoChange_t { NoChange }" which should get rid of the warning (changeset c009e74a417d).
Comment 2 Nobody 2019-12-04 11:36:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to'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:

Note You need to log in before you can comment on or make changes to this bug.