This is the mail archive of the gcc-bugs@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]

[Bug c/18166] top const stripped in structs for C


------- 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


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