c++: hard error w/ ptr+N and incomplete type [PR103700]
In pointer_int_sum when called from a SFINAE context, we need to avoid calling size_in_bytes_loc on an incomplete pointed-to type since this latter function isn't SFINAE-enabled and always emits an error on such input. PR c++/103700 gcc/c-family/ChangeLog: * c-common.c (pointer_int_sum): When quiet, return error_mark_node for an incomplete pointed-to type and don't call size_in_bytes_loc. gcc/testsuite/ChangeLog: * g++.dg/template/sfinae32.C: New test.
Loading
Please register or sign in to comment