https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110110
Bug ID: 110110
Summary: [14 regression] nodejs/v8 fails to compile with error:
cannot convert
‘std::vector<cppgc::internal::StatsCollector::Allocati
onObserver*>::iterator’ to ‘const char*’
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Created attachment 55252
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55252&action=edit
v8_base_without_compiler.sweeper.ii.xz
nodejs-20.2.0 stopped compiling within the last few days on trunk.
I last built it successfully on the 31st May, but I may have been using a GCC
that was a day old at that point. I'm unsure if this is a V8 bug or a GCC bug,
but given it compiled a few days ago with trunk, I figured I'd file it here
first. I'll try a bisect in a minute.
The attached preprocessed source fails for me like:
```
$ g++ -c v8_base_without_compiler.sweeper.ii
In file included from ../../deps/v8/src/heap/cppgc/sweeper.h:14,
from ../../deps/v8/src/heap/cppgc/sweeper.cc:5:
../../deps/v8/src/heap/cppgc/stats-collector.h: In member function ‘void
cppgc::internal::StatsCollector::ForAllAllocationObservers(Callback)’:
../../deps/v8/src/heap/cppgc/stats-collector.h:401:48: error: cannot convert
‘std::vector<cppgc::internal::StatsCollector::AllocationObserver*>::iterator’
to ‘const char*’
In file included from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/cstdio:42,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/ext/string_conversions.h:45,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/bits/basic_string.h:4103,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/string:54,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/bits/locale_classes.h:40,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/bits/ios_base.h:41,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/ios:44,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/istream:40,
from
/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/sstream:40,
from ../../deps/v8/src/base/logging.h:10,
from ../../deps/v8/src/base/macros.h:12,
from ../../deps/v8/src/heap/cppgc/sweeper.h:10:
/usr/include/stdio.h:152:32: note: initializing argument 1 of ‘int
remove(const char*)’
152 | extern int remove (const char *__filename) __THROW;
| ~~~~~~~~~~~~^~~~~~~~~~
../../deps/v8/src/heap/cppgc/sweeper.cc: In function ‘constexpr const char*
cppgc::internal::{anonymous}::ToString(MutatorThreadSweepingMode)’:
../../deps/v8/src/heap/cppgc/sweeper.cc:62:1: warning: control reaches end of
non-void function [-Wreturn-type]
```
```
gcc (Gentoo 14.0.0 p, commit 7a6b2d23ec02e75475a6123254ccd44d73827f39) 14.0.0
20230604 (experimental) 321cee7e29d1b9fc0b5e0b28f2bb8faa9eb6d3e4
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```