There are some extensions in the GNU g++ compilers such as VLA (variable length arrays), even though those features are not C++ standards.
So if I need to compile a
Pass the -pedantic-errors flag. Be sure to set a standard with -std=, such as -std=c++14. This works in clang as well.
-pedantic-errors
-std=
-std=c++14