This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: g++ 2.95 typeinfo::name()
- To: dewar at gnat dot com, dvv at egcs dot dvv dot ru, jcast at ou dot edu, mrs at windriver dot com
- Subject: RE: g++ 2.95 typeinfo::name()
- From: dewar at gnat dot com
- Date: Tue, 23 Jan 2001 09:41:16 -0500 (EST)
- Cc: gcc at gcc dot gnu dot org
The qsort example misses my point. I am all if favor of doing useful
things, but the argument that the standard requires doing "useful"
things, or "deterministic" things is confused. If you want to argue
from the standard, fine, but then you must do it properly.
If you want to argue on the basis of what is useful, regardless of
the standard, then that's fine too.
In fact I assume that a typical qsort is quadratic in the worst case,
though hopefully not in the average case. I am not clear what the
standard has to say about qsort if anything, so I would have to look
that up.
I think there is merit in being absolutely clear on what the standard
does and does not require.
This is particularly relevant when it comes to optimization issues.
Many users may find it unuseful for the optimizer to do things that
are allowed by the standard, but in practice unexpected, e.g. a fair
number of C programs assume wrap semantics for signed integer
arithmetic, and an optimizer that propagated unexpected information
from knowing that integer arithmetic will never overflow might be
considered "unuseful" by some.
So all I was saying here is that it is important to be very clear
on whether you are arguing from the standard or not. And in particular,
if you *are* arguing from the standard, then
a) there is no concept of preferring a "useful" behavior on undefined
or implementation defined actions, that is outside the scope of the standard.
b) there is no concept of preferring a "deterministic" behavior on undefined
or implementation defined actions, that is outside the scope of the standard.
I *do* agree that the mere fact that something is allowed by the standard
is not an argument *for* doing it!