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: [patch, fortran] Improve dependency checking


On Thu, Jul 25, 2019 at 04:42:44PM +0200, Thomas Koenig wrote:
> Hi Steve,
> 
> >> -int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *);
> >> +int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *, bool identical = false);
> > This is changing the prototype.  I would expect to see
> > 
> > 
> > int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *, bool);
> 
> Usig C++'s optional arguments is actually quite useful, it's used
> already used in a few places in the front end.
> 
> The idea is that you don't need to touch the other callers, just the
> ones where the new argument matters.
> 
> However, in this particular case, it would also be possible to ajust
> all other callers (exactly one), if you prefer.
> 

Ah, I don't speak C++, and didn't know one could corrupt a
C prototype in this manner.  A quick glance of gfortran.h
indeed shows a few more occurences of "bool xxx = false".
I suppose the patch is then OK.

PS: watch for long lines.

-- 
Steve


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