tup
tup copied to clipboard
#pragma once on Linux Clang fails on random files, but deterministic
On the rare random occasion, this include guard problem happens when using #pragma once:
game//home/datgame/dev/project/game/sound.h:42:8: error: redefinition of "Sound_memory"
struct Sound_memory {
^
game/./sound.h:42:8: note: previous definition is here
struct Sound_memory {
Adding ordinary #ifndef/#define#endif include guards fixes it.
Does this happen with both GCC and Clang?
It only happens with Clang. GCC and MSVC don't have this problem. (my game compiles with all 3)
For me too. I also think that it started to happen in a recent clang version.