Warining on clang 11 about anonymous enum
Clang 11 now complains about anonymous non-C-compatible. It seems that their reasoning to set this warning is inspired by this paper. Following the compiler suggestion effectively removes the warning in downstream modules. I do not know the consequences, though.
[ 0%] Building CXX object dune/uggrid/CMakeFiles/duneuggrid3d.dir/gm/algebra.cc.o
In file included from /home/sospinar/Codes/DUNE_COPASI/dune-uggrid/dune/uggrid/gm/algebra.cc:65:
In file included from /home/sospinar/Codes/DUNE_COPASI/dune-uggrid/dune/uggrid/low/debug.h:35:
In file included from /home/sospinar/Codes/DUNE_COPASI/dune-uggrid/dune/uggrid/low/misc.h:36:
/home/sospinar/Codes/DUNE_COPASI/dune-uggrid/dune/uggrid/low/heaps.h:112:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
typedef struct {
^
HEAP
/home/sospinar/Codes/DUNE_COPASI/dune-uggrid/dune/uggrid/low/heaps.h:112:9: note: type is not C-compatible due to this member declaration
typedef struct {
^~~~~~
/home/sospinar/Codes/DUNE_COPASI/dune-uggrid/dune/uggrid/low/heaps.h:117:3: note: type is given name 'HEAP' for linkage purposes by this typedef declaration
} HEAP;