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

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

2021-05-07 Thread David Lamparter
ified-size system types (pid_t, uid_t, ...) impossible. gcc/c/ChangeLog: 2021-03-09 David Lamparter PR c/99526 * c-typeck.c (build_c_cast): retain (unqualified) typedefs in casts rather than stripping down to basic type. --- gcc/c/c-typeck.c

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

2021-03-15 Thread David Lamparter
ified-size system types (pid_t, uid_t, ...) impossible. gcc/c/ChangeLog: 2021-03-09 David Lamparter PR c/99526 * c-typeck.c (build_c_cast): retain (unqualified) typedefs in casts rather than stripping down to basic type. --- gcc/c/c-typeck.c

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

2021-03-15 Thread David Lamparter
On Fri, Mar 12, 2021 at 09:35:44AM +0100, Jakub Jelinek wrote: > On Fri, Mar 12, 2021 at 04:08:17AM +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 invo

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

2021-03-11 Thread David Lamparter
ified-size system types (pid_t, uid_t, ...) impossible. gcc/c/ChangeLog: 2021-03-09 David Lamparter PR c/99526 * c-typeck.c (build_c_cast): retain (unqualified) typedefs in casts rather than stripping down to basic type. --- gcc/c/c-typeck.c

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 cons

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, > >> result

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

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

2021-03-09 Thread David Lamparter
ified-size system types (pid_t, uid_t, ...) impossible. gcc/c/ChangeLog: 2021-03-09 David Lamparter * c-typeck.c (build_c_cast): retain (unqualified) typedefs in casts rather than stripping down to basic type. --- gcc/c/c-typeck.c | 11 +++ gcc/testsuite/g