This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Daniel Berlin <dberlin@dberlin.org> writes:
On Tue, 2004-12-21 at 11:01 -0800, Zack Weinberg wrote:Geoffrey Keating <geoffk@geoffk.org> writes:
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.
It's not gengtype, the problem really is that you cannot have const
GCed memory, for the same underlying reasons that you cannot free() a
const pointer.
No, that's just plain not true. cpplib makes extensive use of 'const'
to indicate write-once data structures (they are initialized through a
non-const pointer, of course). Those definitely can be GC memory.
Right. There is a significant difference between what we need to walk for marking, and what we really need to GC allocate.
While what you say is true¹, this particular data structure needs to be in GC memory not because it can point to other things that are in GC memory, but because it's part of a precompiled header.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |