This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51033] generic vector subscript and shuffle support was not added to C++


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51033

--- Comment #22 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-22 15:09:23 UTC ---
(In reply to comment #20)
> And then I still need to write a cxx_eval_vec_perm function so the result of
> __builtin_shuffle can be constexpr. I haven't seen how the C front-end handles
> shuffles of constants. Maybe a "sorry" would do for now.

Making vectors literals is too much for now, the following seems sufficient as
long as they are not.

--- cp/semantics.c    (revision 186667)
+++ cp/semantics.c    (working copy)
@@ -8262,10 +8262,11 @@ potential_constant_expression_1 (tree t,
     case TRANSACTION_EXPR:
     case IF_STMT:
     case DO_STMT:
     case FOR_STMT:
     case WHILE_STMT:
+    case VEC_PERM_EXPR:
       if (flags & tf_error)
         error ("expression %qE is not a constant-expression", t);
       return false;

     case TYPEID_EXPR:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]