Re: [PATCH] c: don't drop typedef information in casts

2021-05-18 Thread Joseph Myers
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 informat

Re: [PATCH] c: don't drop typedef information in casts

2021-05-18 Thread David Lamparter
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 eve

Re: [PATCH] c: don't drop typedef information in casts

2021-03-10 Thread David Lamparter
On Wed, Mar 10, 2021 at 08:02:16PM +0100, David Lamparter wrote: > Also, in seeing your response re. the volatile, it occured to me that > stripping qualifiers on a typedef and still calling it the typedef is > unhelpful. Ideally, my goal is: > > typedef int i; > typedef const int ci; > typeof((i

Re: [PATCH] c: don't drop typedef information in casts

2021-03-10 Thread David Lamparter
On Wed, Mar 10, 2021 at 10:01:39AM -0700, Martin Sebor wrote: > On 3/9/21 6:46 PM, David Lamparter wrote: > > On Wed, Mar 10, 2021 at 02:28:15AM +0100, David Lamparter wrote: > >> The TYPE_MAIN_VARIANT() here was, for casts to a typedef'd type name, > >> resulting in all information about the typed

Re: [PATCH] c: don't drop typedef information in casts

2021-03-10 Thread Martin Sebor via Gcc-patches
On 3/9/21 6:46 PM, David Lamparter wrote: On Wed, Mar 10, 2021 at 02:28:15AM +0100, 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 warnin

Re: [PATCH] c: don't drop typedef information in casts

2021-03-09 Thread David Lamparter
On Wed, Mar 10, 2021 at 02:28:15AM +0100, 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 eve