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 python/23936] python: cast of typedef loses address


https://sourceware.org/bugzilla/show_bug.cgi?id=23936

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I'm not completely sure this is a bug.
Casting an rvalue will sometimes convert it to a different size.
So preserving the address definitely can't always work.

On the other hand, casting from a typedef to the underlying type
does seem like it should always be safe and so could be
location-preserving.

A workaround for this case is to cast the address instead of the
value.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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