This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 gdb/9837] New: sizeof( int(*)(int *) ) == 1?


Walk up to a machine with gdb.
Run gdb.
Type "print sizeof( int(*)(int *) )"

The result comes back as "1".

I believe on most machines the answer should be 4.  Maybe 8 on some.
You might even have one that comes back with 2 if you're into antiques.

But 1?

All of the components of this (function pointer, int, int pointer) have a
size greater than 1.

-- 
           Summary: sizeof( int(*)(int *) ) == 1?
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: chris dot interim at gmail dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=9837

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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