You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my virtual machine, the clang++ version is "Ubuntu clang version 14.0.0-1ubuntu1", and the g++ version is "gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)".
I tried both of them, but still got failed to compile it, here is the terminal output when using clang++:
clang++ -Ilib -Icommon -Iexternals/tinyxml -std=c++0x -O2 -include lib/cxx11emu.h -DNDEBUG -Wall -Wno-sign-compare -Wno-unknown-pragmas -Wno-reorder -c -o cli/tscexecutor.o cli/tscexecutor.cpp
cli/tscexecutor.cpp:322:13: error: variable length array declaration not allowed at file scope
static char mytstack[MYSTACKSIZE]; // alternative stack for signal handler
^ ~~~~~~~~~~~
1 error generated.
make: *** [Makefile:284: cli/tscexecutor.o] Error 1
Obviously, the option "-std=c++0x" is already specified in the compile command, but the compiler still said the length of the array "mytstack" is not constant, so I checked the code at cli/tscexecutor.cpp:322:13:
staticconstsize_tMYSTACKSIZE=16*1024+SIGSTKSZ; // wild guess about a reasonable bufferstaticcharmytstack[MYSTACKSIZE]; // alternative stack for signal handlerstaticboolbStackBelowHeap= false; // lame attempt to locate heap vs. stack address space
SIGTKSZ is now not a macro anymore, here is the news.
Maybe it's a better choice to allocate this array dynamically now.
The text was updated successfully, but these errors were encountered:
For my virtual machine, the clang++ version is "Ubuntu clang version 14.0.0-1ubuntu1", and the g++ version is "gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)".
I tried both of them, but still got failed to compile it, here is the terminal output when using clang++:
Obviously, the option "-std=c++0x" is already specified in the compile command, but the compiler still said the length of the array "mytstack" is not constant, so I checked the code at cli/tscexecutor.cpp:322:13:
SIGTKSZ is now not a macro anymore, here is the news.
Maybe it's a better choice to allocate this array dynamically now.
The text was updated successfully, but these errors were encountered: