The following doesn't produce accurate dbx stabs information on powerpc-apple-darwin:

struct ssc { char * const ptr; };
struct ss { char * ptr; };

int main ()
{
  struct ssc xssc;
  struct ss xss;
}

(gdb) ptype xss
type = struct ss {
    char *ptr;
}
(gdb) ptype xssc
type = struct ssc {
    char *ptr;
}

http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01872.html has a wrong patch.  The 
corresponding 
C++ code works as expected.

Radar 3085329

-- 
           Summary: top const stripped in structs for C
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrs at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin8.0.0b2
  GCC host triplet: powerpc-apple-darwin8.0.0b2
GCC target triplet: powerpc-apple-darwin8.0.0b2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18166

Reply via email to