Skip to content

Commit

Permalink
COMP: non-C-compatible type given name for linkage
Browse files Browse the repository at this point in the history
Resolves #1711

ITK/Modules/Core/Common/test/itkTimeStampTest.cxx:27:35: warning:
anonymous non-C-compatible type given name for linkage purposes by alias
declaration; add a tag name here [-Wnon-c-typedef-for-linkage] using

TimeStampTestHelper = struct
                           ^
                            TimeStampTestHelper

Due to a recent (but retroactive) C++ rule change, only sufficiently
C-compatible classes are permitted to be given a typedef name for
linkage purposes. Add an enabled-by-default warning for these cases, and
rephrase existing error for the case where we encounter the typedef
name for linkage after we've already computed and used a wrong linkage
in terms of the new rule.
  • Loading branch information
hjmjohnson committed Mar 19, 2020
1 parent 1e708db commit 68bc9ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/Core/Common/test/itkTimeStampTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// A helper struct for the test, the idea is to have one timestamp per thread.
// To ease the writing of the test, we use MultiThreaderBase::SingleMethodExecute
// with an array of timestamps in the shared data
using TimeStampTestHelper = struct
using TimeStampTestHelper = struct TimeStampTestHelperStruct
{
std::vector<itk::TimeStamp> timestamps;
std::vector<unsigned long> counters;
Expand Down

0 comments on commit 68bc9ea

Please sign in to comment.