You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<source>:3:5: error: redefinition of 'pipe' as different kind of symbol
3 | int pipe;
| ^
/usr/include/unistd.h:437:12: note: previous definition is here
437 | extern int pipe (int __pipedes[2]) __THROW __wur;
| ^
1 error generated.
Note that Clang-17's libc++, libc++, and MSVC-STL accept it.
Mainly curious where did you spot this?
The issue is due to including unistd.h which is needed for isatty. I'm surprised it's not an issue for libstdc++, I'm sure they use isatty too (https://cplusplus.github.io/LWG/issue4044).
Mainly curious where did you spot this? The issue is due to including unistd.h which is needed for isatty. I'm surprised it's not an issue for libstdc++, I'm sure they use isatty too (https://cplusplus.github.io/LWG/issue4044).
Activity
mordante commentedon Jan 29, 2024
Mainly curious where did you spot this?
The issue is due to including
unistd.h
which is needed forisatty
. I'm surprised it's not an issue for libstdc++, I'm sure they useisatty
too (https://cplusplus.github.io/LWG/issue4044).frederick-vs-ja commentedon Jan 30, 2024
libstdc++ only includes
<unistd.h>
in a separately compiled source file in order to avoid name conflict.https://github.com/gcc-mirror/gcc/blob/f22a7ae8a96f7e5e330b12bd5045424619aa4926/libstdc%2B%2B-v3/src/c%2B%2B23/print.cc
hewillk commentedon Jan 30, 2024
I had a small piece of code that defined a namespace named
pipe
, and then suddenly found that it could not be compiled in clang-trunk.[libc++][print] Moves is_terminal to the dylib.
mordante commentedon Feb 2, 2024
Thanks for the info. I'm testing a patch now once approved I'll request to cherry-pick it to the LLVM-18 release branch.
[libc++][print] Moves is_terminal to the dylib.
[libc++][print] Moves is_terminal to the dylib.
[libc++][print] Moves is_terminal to the dylib.
[libc++][print] Moves is_terminal to the dylib. (#80464)
4 remaining items