On Tue, 18 May 2021, David Lamparter wrote: > On Fri, May 07, 2021 at 06:09:35PM +0200, David Lamparter wrote: > > The TYPE_MAIN_VARIANT() here was, for casts to a typedef'd type name, > > resulting in all information about the typedef's involvement getting > > lost. This drops necessary information for warnings and can make them > > confusing or even misleading. It also makes specialized warnings for > > unspecified-size system types (pid_t, uid_t, ...) impossible. > > Any comments on this? Anything I can do to move this forward? Or is it > not suitable to be picked up?
Every time I've looked at it, I've been uneasy about the same issue previously mentioned in review of how the patch looks up names while processing a cast, which seems very suspicious to me as it did to previous reviewers - all name lookup should have been done earlier in parsing, not in the subsequent semantic analysis involved in processing or diagnosing a cast. If you think there is some reason that late name lookup is either necessary or correct, it would help to have a rather longer commit message that explains the reasoning involved at length (patch submissions should always be self-contained, so include a self-contained commit message explaining whatever issues may arise in review of the patch, including any issues from previous reviews that haven't been addressed through changes to the patch). Because the name lookup is suspicious, it probably *also* needs explanation in a comment in the code for why it wasn't done earlier in parsing. -- Joseph S. Myers jos...@codesourcery.com