Thomas Koenig - Re: [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/m (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Thomas Koenig
- To: Tobias Burnus
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 Feb 2007 13🔞11 +0100
- Subject: Re: [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
- References: <45C1ABEF.1080207@net-b.de> <20070201195551.GA4084@meiner.onlinehome.de> <45C2FC38.70502@net-b.de> <45C30C0C.5060900@codesourcery.com> <45C459D4.6000209@net-b.de>
On Sat, Feb 03, 2007 at 10:45:56AM +0100, Tobias Burnus wrote:
While I still don't understand why m4/pow.m4:ifelse(rtype_letter,i,`dnl works (unquoted "i"). I found out why
The quoting rules of m4 are arcane at best, and the style of the m4 files in libgfortran is also pretty bad (a lot of reversed quoting going on there).
Unfortunately, m4 is pretty much a write-only language. Also, the state of the m4 files is pretty sorry (the style is inconsistent, and there is no documentation). I've submitted PR 30690 about this (thre really should be a 'cleanup' keyword :-).
It works for "function_r8.c" where rtype_letter is "r", but it fails for "function_16_r8.c" since rtype is integer(16) and while atype is real(8).
Ah, my mistake. Sorry for not checking the results more thoroughly.
The following fixes it:
define(atype_min,ifelse(regexp(file,
_\(.\)[0-9]*\.c$',
\1'),i',
(-'atype_max-1)',
-'atype_max))dnl
Ok for the trunk and a week later for the 4.2 branch?
I'll look at it later this weekend, if nobody else beats me to it.
Thomas
- References:
- [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
* From: Tobias Burnus - Re: [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
* From: Thomas Koenig - Re: [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
* From: Tobias Burnus - Re: [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
* From: Brooks Moses - Re: [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
* From: Tobias Burnus
- [Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |