https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93618
Bug ID: 93618 Summary: [10 Regression] : unknown array size in delete when using C++20 standard Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: laurent.stacul at gmail dot com Target Milestone: --- Hello, I tried to compile Re2 (https://github.com/google/re2) with a close to HEAD gcc: g++ (GCC) 10.0.1 20200124 (experimental) And I got the error described here: https://github.com/google/re2/issues/102. This one was fixed several years ago for gcc 6.1 & 6,2 through https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71147. Now with gcc 10 it works fine except when I add the flag -std=gnu++2a as you can see below: $ make CXXFLAGS="-std=gnu++2a" -j8 ... g++ -c -o obj/re2/dfa.o -std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. -std=gnu++2a -DNDEBUG re2/dfa.cc re2/dfa.cc: In constructor ‘constexpr re2::DFA::State::State()’: re2/dfa.cc:120:10: error: unknown array size in delete 120 | struct State { | ^~~~~ re2/dfa.cc: In member function ‘re2::DFA::State* re2::DFA::CachedState(int*, int, uint32_t)’: re2/dfa.cc:753:9: note: synthesized method ‘constexpr re2::DFA::State::State()’ first required here 753 | State state; | ^~~~~ Thanks in advance for you help, Stac