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]

Re: Compiling GCC With a C++ Compiler (g++)


Zack Weinberg <zack@codesourcery.com> writes:

[...]

| However, we need a way to write the structure declaration too.  You
| would know better than me how that might be accomplished.  (Remember,
| only the intersection of C and C++ can be used.)


What we want to achieve is that any "unauthorized" person who accesses
the string  cannot modify it.  We can't put the const in the
structure; but we can put "(const char *)" in front of the string
accessor, to pretend it is nonmodifiable.  The patch sent by Ranjit
does a good job.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]