gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] some GCL bugs revealed by ansi test suite


From: Thomas F. Burdick
Subject: Re: [Gcl-devel] some GCL bugs revealed by ansi test suite
Date: Thu, 15 Aug 2002 16:42:13 -0700

Vadim V. Zhytnikov writes:
 > Thomas F. Burdick ?????:
 > >  > "Vadim V. Zhytnikov" <address@hidden> writes:
 > >  >
 > >  > > First, a couple of very simple bugs:
 > >  > > 
 > >  > > 1)  (make-array 5 :fill-pointer -1)
 > >  > > must signal an error for any negative value
 > >  > > of :fill-pointer.
 > > 
 > > Camm Maguire writes:
 > > 
 > >  > Done.  Please verify.
 > > 
 > > This is a good feature, but it's not required by the ANSI spec.  If
 > > something fails the CLOCC test suite, be sure to actually check the
 > > spec to make sure that what the suite expects is actually required --
 > > in this case, that's not really a problem, because signaling an error
 > > is pretty obviously the right thing to do, but sometimes that suite
 > > requires things that are in no way required by ANSI.
 > 
 > I dont quite agree with you.  Although ANSI standard
 > defines no exceptional situation for make-array
 > it also states that the :fill-pointer must be _valid_
 > fillpointer.  And _valid_ fillpointer is defined
 > as nonnegative.

Exactly, all it says is that fill-pointer *must* be a valid fill
pointer.  It doesn't say that "it is an error" if it's not valid.
This means that giving MAKE-ARRAY a fill-pointer argument that's not a
valid fill pointer invokes undefined behavior.

In this case, signaling an error is the sane thing to do, but it's not
required.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               




reply via email to

[Prev in Thread] Current Thread [Next in Thread]