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

Gabriel Dos Reis gdr@cs.tamu.edu
Wed Oct 13 13:45:00 GMT 2004


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



More information about the Gcc mailing list