[PATCH, Fortran] Fix PR36112: Bounds-checking on character-array-constructors

FX fxcoudert@gmail.com
Mon May 19 07:39:00 GMT 2008


> Did I?  AFAIK, I added this NULL thing only to  
> get_array_ctor_strlen, and not to any of the others (as this  
> function not only calculates the length but also is_const); there  
> it is called with NULL argument for sub-array-constructors not at  
> the first position (thus where we are not interested in the length).

You're right, I misread the patch. Please update the comment on top  
of get_array_ctor_strlen() accordingly/

> I'm not sure about how important is_const is, another (faster)  
> approach would of course be to break the loop after we've found our  
> length; but then we don't know about constness of following elements.

The current way is fine with me.

> I'll provide an updated patch (with the condition on the error  
> message and the XXX-mark removed) when the point above (and every  
> other review details) are cleared, ok?

I think it'll be OK, please submit an updated patch and I'll approve  
and commit.

FX

-- 
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/



More information about the Fortran mailing list