Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Feb 19, 2025

Backport 2b340c1

Requested by: @tstellar

I think this first stopped working with
9548366. This patch fixes the following
error:

/home/runner/work/llvm-project/llvm-project/flang/runtime/io-api-minimal.cpp:153:11:
error: '__libcpp_verbose_abort' is missing exception specification
'noexcept'
   153 | void std::__libcpp_verbose_abort(char const *format, ...) {
       |           ^
| noexcept
/mnt/build/bin/../include/c++/v1/__verbose_abort:30:28: note: previous
declaration is here
30 | __printf__, 1, 2) void __libcpp_verbose_abort(const char* __format,
...) _LIBCPP_VERBOSE_ABORT_NOEXCEPT;
       |                            ^
1 error generated.

(cherry picked from commit 2b340c1)
@llvmbot llvmbot added this to the LLVM 20.X Release milestone Feb 19, 2025
@llvmbot
Copy link
Member Author

llvmbot commented Feb 19, 2025

@ldionne What do you think about merging this PR to the release branch?

@llvmbot llvmbot requested a review from ldionne February 19, 2025 14:59
@llvmbot llvmbot added flang:runtime flang Flang issues not falling into any other category labels Feb 19, 2025
@llvmbot
Copy link
Member Author

llvmbot commented Feb 19, 2025

@llvm/pr-subscribers-flang-runtime

Author: None (llvmbot)

Changes

Backport 2b340c1

Requested by: @tstellar


Full diff: https://github.com/llvm/llvm-project/pull/127805.diff

1 Files Affected:

  • (modified) flang/runtime/io-api-minimal.cpp (+2-1)
diff --git a/flang/runtime/io-api-minimal.cpp b/flang/runtime/io-api-minimal.cpp
index 68768427be0c2..93ac82248aa4c 100644
--- a/flang/runtime/io-api-minimal.cpp
+++ b/flang/runtime/io-api-minimal.cpp
@@ -150,7 +150,8 @@ bool IODEF(OutputLogical)(Cookie cookie, bool truth) {
 // Provide own definition for `std::__libcpp_verbose_abort` to avoid dependency
 // on the version provided by libc++.
 
-void std::__libcpp_verbose_abort(char const *format, ...) {
+void std::__libcpp_verbose_abort(char const *format, ...) noexcept(
+    noexcept(std::__libcpp_verbose_abort(""))) {
   va_list list;
   va_start(list, format);
   std::vfprintf(stderr, format, list);

@tstellar tstellar merged commit 2b70b17 into llvm:release/20.x Feb 20, 2025
14 checks passed
@github-actions
Copy link

@tstellar (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:runtime flang Flang issues not falling into any other category

Projects

Development

Successfully merging this pull request may close these issues.

3 participants