This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GTY and const
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Matt Kraai <kraai at ftbfs dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 14 Dec 2004 10:34:55 -0800
- Subject: Re: GTY and const
- References: <20041213203007.GA4907@localhost.localdomain>
Matt Kraai <kraai@ftbfs.org> writes:
> Howdy,
>
> One of the warnings that causes PR 18176 is an assignment of a const
> cpp_token * to the source member of the val union of the cpp_token
> structure, which is not const. According to the uses I've found, this
> member could be const, except that doing so causes warnings in
> gtype-desc.c, which does not preserve the const qualifier.
>
> Would it be better to add a cast around the assignment or to make
> the GTY code handle const members?
I'd prefer that you improved gengtype.
zw