https://bugs.llvm.org/show_bug.cgi?id=41068

            Bug ID: 41068
           Summary: std::ifstream::failure doesn't report system error
                    codes
           Product: libc++
           Version: 8.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Created attachment 21596
  --> https://bugs.llvm.org/attachment.cgi?id=21596&action=edit
test.cpp

On FreeBSD the attached testcase triggers the errno=2 (No such file or
directory):
>  71779 io       CALL  
> open(0x4065e0,0x601<O_WRONLY|O_CREAT|O_TRUNC>,0666<S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH>)
>  71779 io       NAMI  "a/b"
>  71779 io       RET   open -1 errno 2 No such file or directory

But the error message printed through the exception std::ifstream::failure
doesn't contain this information:
> ios_base::clear: unspecified iostream_category error

Why is it "unspecified"?

It should say exactly what happened.

FreeBSD 11.2.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to