Skip to content

Commit ab03bfc

Browse files
committed
reformat
1 parent 34a150a commit ab03bfc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

flang/include/flang/Common/variant.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ using cuda::std::visit;
2929
// directly and which defines a macro we need to redefine.
3030
#include <initializer_list>
3131

32-
// The macro _GLIBCXX_THROW_OR_ABORT is used by libstdc++ to not throw exceptions in -fno-exceptions mode, but immediatly kill the program. Since libstdc++ 15.1 the macro uses (void)(_EXC) after calling abort() to silence compiler warnings of an parameter. In its use in <variant>, _EXC is the construction of `std::bad_variant_access`. In non-optimized builds, some compilers including Clang will emit a call to that constructor. The constructor is implemented in libstdc++.a/.so which Flang-RT must not depend on (to avoid compatibility problems if a Fortran application itself has parts implemented in C++). Note that _GLIBCXX_THROW_OR_ABORT is not on the list of libstdc++'s documented user-configurable macros.
32+
// The macro _GLIBCXX_THROW_OR_ABORT is used by libstdc++ to not throw
33+
// exceptions in -fno-exceptions mode, but immediatly kill the program. Since
34+
// libstdc++ 15.1 the macro uses (void)(_EXC) after calling abort() to silence
35+
// compiler warnings of an parameter. In its use in <variant>, _EXC is the
36+
// construction of `std::bad_variant_access`. In non-optimized builds, some
37+
// compilers including Clang will emit a call to that constructor. The
38+
// constructor is implemented in libstdc++.a/.so which Flang-RT must not depend
39+
// on (to avoid compatibility problems if a Fortran application itself has parts
40+
// implemented in C++). Note that _GLIBCXX_THROW_OR_ABORT is not on the list of
41+
// libstdc++'s documented user-configurable macros.
3342
#undef _GLIBCXX_THROW_OR_ABORT
3443
#define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort())
3544

0 commit comments

Comments
 (0)