https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69257
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think the thing is that in C dereferencing a pointer to incompete type is always error, while in C++ it is supported (unless it is pointer to cv void), but it just can't be converted to rvalue. Now, if the constraint is either "" or even "r" (but not mem), we call here /* If the operand is going to end up in memory, don't call decay_conversion. */ if (constraint_parsed && !allows_reg && allows_mem) operand = mark_lvalue_use (TREE_VALUE (t)); else operand = decay_conversion (TREE_VALUE (t), tf_warning_or_error); but decay_conversion for some reason complains just about VOID_TYPE, but not about other incomplete types. So, the question is where else would the C++ FE error out on dereferencing of incomplete type turned into rvalues, or whether we just should error here (check for incomplete type other than VOID_TYPE), something else?