This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb, c++ & namespaces
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- Cc: eliz at elta dot co dot il, gdb at sources dot redhat dot com
- Date: 16 Jan 2004 23:03:19 +0100
- Subject: Re: gdb, c++ & namespaces
- Organization: Integrable Solutions
- References: <20040115125112.182744B104@berman.michael-chastain.com>
mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:
| eli> The manual doesn't mention "static type" and "dynamic type" in the
| eli> section that describes "set pruint". I think it should, if this
| eli> terminology is to be widely accepted.
|
| I don't know what the popular usage in the C++ community is.
| I don't want to invent new phrases if there are existing phrases.
"static type" and "dynamic type" are not new phrases :-)
| I checked "The C++ Programming Language" and it does not have
| any nice phrases to distinguish "the type that the pointer says"
| versus "the type that the object in memory has".
I think GDB maintainers should also consult the C++ standard when they
implement support tools for C+ ;-).
1.3.3 dynamic type
the type of the most derived object (1.8) to which the lvalue
denoted by an lvalue expression refers. [Example: if a pointer
(8.3.1) p whose static type is "pointer to class B" is pointing to
an object of class D, derived from B (clause 10), the dynamic type
of the expression *p is "D". References (8.3.2) are treated
similarly. ] The dynamic type of an rvalue is its static type.
1.3.11 static type
the type of an expression (3.9), which type results from analysis
of the program without considering execution semantics. The static
type of an expression depends only on the form of the program in
which the expression appears, and does not change while the program
is executing.
-- Gaby