Skip to content

Work around compiler bug in GCC 12 in string concatenation #2491

@lifflander

Description

@lifflander

Describe the bug

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

diff --git a/src/vt/configs/debug/debug_print.h b/src/vt/configs/debug/debug_print.h
index 46f42d140..8f18e9d00 100644
--- a/src/vt/configs/debug/debug_print.h
+++ b/src/vt/configs/debug/debug_print.h
@@ -78,7 +78,7 @@
   vt_print_colorize_impl(::vt::debug::bd_green(), "vt", ":")

 #define vt_proc_print_colorize(proc)                                    \
-  vt_print_colorize_impl(::vt::debug::blue(), "[" + std::to_string(proc) + "]", "")
+  vt_print_colorize_impl(::vt::debug::blue(), std::string("[") + std::to_string(proc) + "]", "")

 #define vt_debug_argument_option(opt)                                   \
   ::vt::debug::preConfig()->vt_debug_ ## opt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions