This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
On Sat, Dec 10, 2016 at 5:52 PM, Andre Vehreschild <vehre@gmx.de> wrote:
> I totally agree, that adding sophisticated C++ features would make gfortran
> hard to read, given that those feature would be used only at a few locations.
> But here I am only using concepts and code, that was already present. I do not
> understand what all this fuzz is about. There is absolutely *nothing* new. The
> old code needed a comment to make clear what was its purpose. The new one just
> says it: Get me the abs-value of that damn wide_int. So what?
Personally, FWIW, I'm fine with C++ (I have a somewhat rusty working
knowledge of C++). Sure, we can add GFortran-specific plain C wrappers
for any C++-ism the middle-end provides, but IMHO that is mostly
wasted work, and also makes it more difficult understand what's going
one with yet another layer of indirection. And it's only going to get
worse as the middle end adopts more C++ features (which AFAIU was one
of the motivations in changing the implementation language from C to
C++ a few years ago).
Also, in my experience the effort required to understand the
relatively limited C++ features we have so far is dwarfed by the
effort to understand what the code itself is doing on a higher level.
And in this particular case, the C++ voodoo was already there before
Andre's patch, namely the innocuous looking line from the snippet
Jerry quoted:
wide_int wrhs = rhs;
Is this one of the 4711 different constructor syntaxes C++ provides,
or is it a default constructor followed by operator=(tree t)? (In the
end I guess it doesn't matter).
Then again, my time for GFortran is very limited these days, so my
opinion shouldn't carry that much weight..
--
Janne Blomqvist
- References:
- [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler
- Re: [PATCH, Fortran, pr78672, ctp1, v1] Gfortran test suite failures with a sanitized compiler