Is GCC officially supported?

I ran into a compilation error when trying to build Node with -O0:

HeapAllocator::AllocateRaw (both the templated and non-templated versions)
are marked as always_inline.
The non-templated version has a switch statement that calls the relevant
templated version.
If v8 is compiled with the single_generation flag set to true, then the
templated version calls the non-templated version with kOld if called with
kYoung. GCC doesn’t like this, it reports that the function couldn’t be
inlined.

When you build without the single_generation flag at -O1 or above, GCC
seems to elide the recursive call entirely (the flag is read-only
constexpr) so it doesn’t hit this issue.

When you build at -O0, that’s not the case, and the inlining fails.

See here for a reduced reproduction:
https://godbolt.org/z/xa8PGqGah

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAJA9qvuDMEVt%2BJZe7KzTRFvA9N0MYaH3m3D4CsogW4fSaQ9h7w%40mail.gmail.com.

Reply via email to