This is the mail archive of the
mailing list for the GCC project.
Re: PR bootstrap/19818: fix libcpp warnings (take 2)
Paolo Bonzini <email@example.com> writes:
>> See the previous discussion on why you can't make GCed stuff 'const'.
> You did not answer to Zack's comments then:
> > > these data structures are not truly
> > > write-once; any pointers contained in them will be changed by saving
> > > a PCH.
> > Sure; however, that happens behind the back of the code that uses this
> > data structure. The 'const' is correctly placed to catch bugs in that
> > code, which is what I care about.
> I suppose if nobody felt the need to make "source" const, I could just
> as well add a cast to remove the const when source is set. But I
> think that this issue ought to be revisited sooner or later.
I agree. However, I'll approve this patch now, as the PCH machinery
is unlikely to change at this point.