Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2024 08:46:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 279692] '#include <csetjmp>' is broken: error: "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"
Message-ID:  <bug-279692-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279692

            Bug ID: 279692
           Summary: '#include <csetjmp>' is broken: error: "If libc++
                    starts defining <setjmp.h>, the __has_include check
                    should move to libc++'s <setjmp.h>"
           Product: Base System
           Version: 14.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

This simple program can't be compiled on 14.1:
#include <csetjmp>

int main() {
}

$ c++ x.cpp=20
In file included from x.cpp:2:
/usr/include/c++/v1/csetjmp:40:6: error: "If libc++ starts defining <setjmp=
.h>,
the __has_include check should move to libc++'s <setjmp.h>"
   40 | #    error "If libc++ starts defining <setjmp.h>, the __has_include
check should move to libc++'s <setjmp.h>"
      |      ^
1 error generated.


The error message doesn't explain what is wrong with the program.

The C++ standard says that <csetjmp> should be included for the C++ feature
std::jmp_buf.

See here: https://en.cppreference.com/w/cpp/utility/program/jmp_buf

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279692-227>