DARMA-tasking / vt

DARMA/vt => Virtual Transport
Other
36 stars 9 forks source link

Make static tag types non-static (regular tag types) in header files #340

Open lifflander opened 5 years ago

lifflander commented 5 years ago

After we do this, we should be able to remove all the gcc unused-variable warnings.

nlslatt commented 5 years ago

The warnings generated by these are not fixed in #306 because [[maybe_unused]] disables the warnings under gcc but creates additional warnings under clang.

nmm0 commented 5 years ago

I tested using constexpr instead of static. While it fixes the issue on gcc it doesn't on clang.

However, clang and icc seem to accept __attribute__((unused)) which is a gcc extension. This seems to work with --pedantic. Are there any restrictions on using gcc extensions?

nlslatt commented 5 years ago

I'm not sure about any restrictions. @bathmatt?

nlslatt commented 5 years ago

For now, in the branch for #306, I just wrapped these instances (and other static structs) in the following:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
...
#pragma GCC diagnostic pop

We will still need to refactor the code in the future.