[cfe-dev] [libcxx]handling missing linux implementations

Larry Evans cppljevans at suddenlink.net
Sun Feb 13 05:41:00 PST 2011


Here:

  http://llvm.org/bugs/show_bug.cgi?id=8992#c7

there's a workaround proposed for a bug; however,
I'm worried that this workaround will just
obscure the problem and make it harder for
user's of the library to realize the library
is not really doing the right thing.

If clang had a:

  #pragma message "not implmented"

somewhat like g++'s then that could be used
instead of the proposed workaround.

There are several other places where:

  #if __APPLE__

occurs in locale.cpp and maybe all of them should
adopt this method for flagging inimplemented features
on linux.  For example, in:

  http://llvm.org/svn/llvm-project/libcxx/trunk/src/locale.cpp

there's:

> const wchar_t*
> ctype<wchar_t>::do_is(const char_type* low, const char_type* high, mask* vec) const
> {
> #ifdef __APPLE__
>     for (; low != high; ++low, ++vec)
>         *vec = static_cast<mask>(isascii(*low) ? _DefaultRuneLocale.__runetype[*low] : 0);
>     return low;
> #else
>     return NULL;
> #endif
> }

In this case, is it better to return NULL on linux or issue a
diagnostic with the proposed new clang '#pragma message'?

-Larry





More information about the cfe-dev mailing list