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

Matthieu Monrocq matthieu.monrocq at gmail.com
Mon Feb 14 12:12:24 PST 2011


Hi Larry,

Perhaps that a `#warning` along the return NULL would be sufficient ?

It seems to me that the user should definitely take care not to use (even if
the result is "coherent") until it's properly implemented.

Matthieu.

Date: Sun, 13 Feb 2011 07:41:00 -0600
> From: Larry Evans <cppljevans at suddenlink.net>
>
> 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
>
>
>
>
> ------------------------------
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> End of cfe-dev Digest, Vol 44, Issue 49
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110214/4f97252d/attachment.html>


More information about the cfe-dev mailing list