On Mon, Nov 19, 2018 at 04:10:09PM -0700, Jeff Law wrote: > > PR c/88065 - ICE in -Wsizeof-pointer-memaccess on an invalid strncpy > > > > gcc/c-family/ChangeLog: > > > > PR c/88065 > > * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source > > or destination is an error. > > > > gcc/testsuite/ChangeLog: > > > > PR c/88065 > > * gcc.dg/Wsizeof-pointer-memaccess2.c: New test. > This is probably OK. But before final ACK, is there a point earlier > where we could/should have bailed out?
IMHO it is a good point, but it should use error_operand_p predicate instead of == error_mark_node checks to also catch the case where the argument is not error_mark_node, but has error_mark_node type. And, the testcase shouldn't be in gcc.dg, but in c-c++-common and cover also C++ testing. Jakub