This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

RE: g++ 2.95 typeinfo::name()


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!

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