This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70932] flexible array member with non-trivial destructor
- From: "junyer at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jul 2016 12:13:24 +0000
- Subject: [Bug c++/70932] flexible array member with non-trivial destructor
- Auto-submitted: auto-generated
- References: <bug-70932-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932
Paul Wankadia <junyer at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |junyer at google dot com
--- Comment #3 from Paul Wankadia <junyer at google dot com> ---
https://github.com/google/re2/issues/102 reported the same error with GCC
6.1.1:
g++ -c -o obj/dbg/re2/dfa.o -std=c++11 -pthread -Wall -Wextra
-Wno-unused-parameter -Wno-missing-field-initializers -I. -O3 -g re2/dfa.cc
re2/dfa.cc: In Konstruktor »re2::DFA::State::State()«:
re2/dfa.cc:95:10: Fehler: unbekannte Feldgröße in »delete«
struct State {
^~~~~
re2/dfa.cc: In Elementfunktion »re2::DFA::State* re2::DFA::CachedState(int*,
int, re2::uint)«:
re2/dfa.cc:703:9: Anmerkung: erzeugte Methode »re2::DFA::State::State()« zuerst
hier erfordert
State state;
^~~~~
make: *** [Makefile:190: obj/dbg/re2/dfa.o] Fehler 1
This is the flexible array member:
std::atomic<State*> next_[];
Is this likely to be the same issue even though std::atomic<T*> should have a
trivial destructor for all T?