GTY and const

Matt Kraai kraai@ftbfs.org
Tue Dec 14 07:00:00 GMT 2004


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?

-- 
Matt



More information about the Gcc mailing list