A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/llvm/llvm-project/issues/85158 below:

libc++ `char_traits.h` assumes `EOF` is always available · Issue #85158 · llvm/llvm-project · GitHub

libc++ assumes that EOF is always available and uses it unconditionally in the char_traits.h implementation.

In file included from /llvm_libcxx/include/chrono:830:                                                                                                                                                                                                                                                                                                                                 
In file included from /llvm_libcxx/include/__chrono/convert_to_tm.h:22:                                                                                                                                                                                                                                                                                                                
In file included from /llvm_libcxx/include/__chrono/statically_widen.h:17:                                                                                                                                                                                                                                                                                                             
In file included from /llvm_libcxx/include/__format/concepts.h:17:                                                                                                                                                                                                                                                                                                                     
In file included from /llvm_libcxx/include/__format/format_parse_context.h:16:                                                                                                                                                                                                                                                                                                         
In file included from /llvm_libcxx/include/string_view:225:                                                                                                                                                                                                                                                                                                                            
/llvm_libcxx/include/__string/char_traits.h:169:100: error: use of undeclared identifier 'EOF'                                                                                                                                                                                                                                                                                         
  169 |   static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT { return int_type(EOF); }                                                                                                                                                                                                                                                                                                                        
      |                                                                                                    ^                                                                                                                                                                                                                                                                                                                              
/llvm_libcxx/include/__string/char_traits.h:169:66: error: no return statement in constexpr function                                                                                                                                                                                                                                                                                   
  169 |   static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT { return int_type(EOF); }

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 where EOF is undefined.

This is related to issue #84879.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4