-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libc++ char_traits.h
assumes EOF
is always available
#85158
Comments
libc++ char_traits.h assumes EOF is always available See llvm#85158 for more details.
I can't really think of a good reason a libc shouldn't provide it. Given that the main thing this might lead to are ODR violations, since libc++ would have to provide it's own if it can't find the libc's, IMO the libc should just provide it. It's not much harder than adding |
libc++ char_traits.h assumes EOF is always available See #85158 for more details.
I've come across this issue in a different setting and I had the same conclusion -- libc should provide it. Basically, |
I suspect that there should be an LWG issue - currently |
The In libstdc++ we make |
libc++ assumes that
EOF
is always available and uses it unconditionally in thechar_traits.h
implementation.LLVM libc doesn't currently define
EOF
on baremetal targets because there's no filesystem support (since baremetal targets typically don't have filesystem to begin with) which results in a compiler error.We could extend LLVM libc to define
EOF
even on baremetal targets, but it's an open question whether libc++ should be able to handle the case whereEOF
is undefined.This is related to issue #84879.
The text was updated successfully, but these errors were encountered: