This is the mail archive of the gcc-patches@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: [gfortran, PR 18540] A few statement label cleanups


On Wed, Jan 18, 2006 at 09:44:56PM +0100, Tobias.Schlueter@Physik.Uni-Muenchen.DE wrote:
> Quoting Steve Kargl <sgk@troutmask.apl.washington.edu>:
> > > Built and tested on i686-linux previously, new testcase attached.  Ok?
> > >
> >
> > Tobi, I've read the patch and believe that it is correct.
> > I particularly like the clean up of the unused 'cnt' variable
> > that I added in a few places.   Although I can't test the
> > patch at the moment, I think it should be committed to trunk.
> > In a week or so, the patch can be committed to 4.1.
> 
> Thanks.  I had accidentally sent a preliminary version of the patch in which I
> had omitted the initialization of 'cnt' to zero in gfc_math_small_literal_int.
> I'll consider readding the initialization obvious, and check this in as
> attached.   ChangeLog as before with 'Only set cnt if non-NULL.' removed. 
> Actually, I find the necessity for this a bit awkward, as we use the cnt
> parameter to distinguish between a number of error messages in the case where
> the matching fails, but this is a cleanup for another patch.
> 

Yeah, cnt is a little awkward, but I couldn't devise a better 
way to deal with the number of digits permitted in a label
or stop code and how leading zeros are treated.  The number
000001 is parsed as 1, but it contains too many digits.  We
can't use the returned value from *_literal_int to determine
if we had a valid label or stop code.

-- 
Steve


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