I would say neither, use std::array<int,3> x{2,3,4}, or std::vector x{2,3,4}. It will make passing arrays around in your code much more easy (even allows you to return arrays from functions)
Using x as length of an array is never possible in standard C++, whether you separate the declarations or not. The size of an array must be a compile-time constant. Some compilers like GCC and Clang offer an extension to the standard language called variable-length arrays originating from C, which allow runtime array sizes. But since these are language extensions there are no standardized rules on how they behave. It could be that the compilers just chose to implement it slightly differently, although Clang generally tries to emulate GCC's behavior (in most cases).
xas length of an array is never possible in standard C++, whether you separate the declarations or not. The size of an array must be a compile-time constant. Some compilers like GCC and Clang offer an extension to the standard language called variable-length arrays originating from C, which allow runtime array sizes. But since these are language extensions there are no standardized rules on how they behave. It could be that the compilers just chose to implement it slightly differently, although Clang generally tries to emulate GCC's behavior (in most cases).