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]
Other format: [Raw text]

Re: Help with bit-field semantics in C and C++


Mark Mitchell <mark@codesourcery.com> writes:

| Gabriel Dos Reis wrote:
| 
| >Mark Mitchell <mark@codesourcery.com> writes:
| >
| >
| >[...]
| >
| >| conversion instructions inserted.  Since EDG passes basically every
| >| known testsuite,
| >
| >That is a very interesting argument.
| >Who sits the baby-sitter, e.g. who makes sure that those testsuite are
| >enough to make sure that a compiler that passes it is bug-free?
| >Actually, by your argument, EDG should stop releasing any version of
| >their front-ends -- yet they still release bug-fixes, even thiugh they
| > have passed known  testsuites.
| Huh?  That's a reduction-to-absurdity argument.

Yes, it is.  The point I was making that is that we can't just argue
by "passing known testsuite".  It is like designing the compiler only
by focusing on known benchmarks.

| The people who write testsuites for a living think a lot about corner

I do not doubt that -- just like people write compilers for living. 
But that sole argument does not make correctness a guaranteed result
-- although the involved people try their best to write bug-free
programs or testsuites that cover the whole field.  But the very
thing that they're still working on the compiler and extending the
testuite is an indication of an imperfect result.

| cases and try to write tests that cause compilers to get the corner
| cases wrong.  They go through the standard line-by-line, thinking of
| pathological things. 

And the "who sits the baby-sitter?" question precisely is asking who
makes sure that they have actually thought of all corner cases.  I
know of at least two major testsuite vendors who continually improve
of their (already excellent) testsuites. 

As a matter of fact, other people actually write formal specifications
for living too, just to make sure that they're covering more, and more
accurately. 

| None of them have ever written the test that
| David is suggesting.  So, that doesn't mean David is wrong, in and of
| itself; he might have thought of something nobody else thought of.
| But, I certainly consider the fact that no testsuite checks for this
| case as evidence against David's position.

That is a position.  Another equally valid is that no one boders
checking that conner case.  This won't be the first time.  It is not
evidence against David's position.

-- Gaby


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