[Patch, fortran] OOP - PR41648 and PR41656

Daniel Kraft d@domob.eu
Wed Oct 14 13:40:00 GMT 2009


Hi Paul,

Paul Richard Thomas wrote:
>> +  /* Convert the vindex expression.  */
>> +  gfc_init_se (&tmpse, NULL);
>> +  gfc_conv_expr (&tmpse, elist->vindex);
>> +  gfc_add_block_to_block (&se->pre, &tmpse.pre);
>> +  vindex = gfc_evaluate_now (tmpse.expr, &se->pre);
>>
>> This kind of stuff has always confused me, but what's about tmpse.post?
>>  Don't you need to handle this, or is it actually even not like I assume
>> this works...?
> 
> There is no need for a post block in an integer scalar expression like
> this; ie. there is nothing to deallocate or whatever.

yes, that's obvious.  But would doing a

gfc_add_block_to_block (&se->post, &tmpse.post);

hurt?  If not, it seems still to be the cleaner way because you don't 
imply that tmpse.post will not be used.  If it is not, fine, but if it 
may get used for whatever purpose in the future, it will also work.

Or would adding this line even be wrong?  (I don't ask you to do so in 
any case and IIRC not adding it is common practice throughout the 
source, but I'd be interested if we could also add it or not.)

>> PS: Your diff's would be much more readable (at least to me) if you would do
>> them with the -p flag (shorthand for --show-c-function) added so that it is
>> readily visible for all hunks (well, most) which function they belong to.
> 
> Ah, yes.  Since subversion changed it's interface, I have failed to
> recover the use of the system diff and so -p is not available.  Tell
> me how to do it in babytalk.

Ok, I'll try (although I'm not completely sure if that's really all I 
did to set it up for myself):  I created a shell-script that basically 
calls diff -p like

#!/bin/sh
diff -p "$@"

and then set/added in ~/.subversion/config (in section [helpers]):

diff-cmd = mydiff

I don't completely remember, but setting diff-cmd = diff -p did not work 
for me for one reason or the other, that's why I had to do this 
helper-script stuff.

Hope this helps or at least leads into the right direction!

Yours,
Daniel

-- 
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri



More information about the Gcc-patches mailing list