This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18166] top const stripped in structs for C
- From: "mrs at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2004 23:27:21 -0000
- Subject: [Bug c/18166] top const stripped in structs for C
- References: <20041026232358.18166.mrs@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mrs at apple dot com 2004-10-26 23:27 -------
For reference, the C++ version:
struct ssc { char * const ptr;
ssc () :ptr(0) { }
};
struct ss { char * ptr; };
int main ()
{
struct ssc xssc;
struct ss xss;
}
and its output:
(gdb) ptype xss
type = struct ss {
char *ptr;
}
(gdb) ptype xssc
type = class ssc {
public:
char * const ptr;
ssc(ssc const&);
ssc();
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18166