https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120247

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> Perhaps __builtin_assoc_barrier should lower to NON_LVALUE_EXPR (PAREN_EXPR
> (expr))
> or PAREN_EXPR (NON_LVALUE_EXPR (expr)) for C++?
> Of course, a big question is what the builtin should do for class types (if
> it shouldn't be an error).

It should be an error, PR 118869 records the case where GCC incorrectly accepts
it for class types and gets ICE.

> And for C++ it also means that __builtin_assoc_barrier can have dependent
> argument and only during instantiation we'd find out if it has
> supported/able type or not.
> Though, __builtin_assoc_barrier is parsed immediately to PAREN_EXPR. 
> Perhaps we want some language flag on whether it is __builtin_assoc_barrier
> or the force_paren_expr created one?

Reply via email to