On Fri, Sep 26, 2008 at 3:10 PM, Sebastian Redl <[EMAIL PROTECTED]> wrote: > Updated patch. Supports arrays and function pointers the same way as GCC (as > near as I can determine). > > What it does not support is array decay. This fails: > > const int ar[100]; > int *pi = const_cast<int*>(ar); > > This is because lvalue-to-rvalue conversion is not performed on the argument > (would lead to array decay). Is a generic facility for this in the semantic > checker somewhere? It's really indispensable for C++ semantic checking. On Fri, Sep 26, 2008 at 3:10 PM, Sebastian Redl <[EMAIL PROTECTED]> wrote: > What it does not support is array decay. This fails: > > const int ar[100]; > int *pi = const_cast<int*>(ar); > > This is because lvalue-to-rvalue conversion is not performed on the argument > (would lead to array decay). Is a generic facility for this in the semantic > checker somewhere? It's really indispensable for C++ semantic checking.
Sema::DefaultFunctionArrayConversion should do what you want in the cases where the destination type isn't a reference type. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
