This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,Fortran] Taking a BYTE out of type-spec
- From: Tobias Burnus <Tobias_Burnus at mentor dot com>
- To: <sgk at troutmask dot apl dot washington dot edu>, <fortran at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 25 Oct 2019 09:05:03 +0200
- Subject: Re: [PATCH,Fortran] Taking a BYTE out of type-spec
- Ironport-sdr: 51AY4cpqsoi9Zq7JKOLuCAE3f078IBRJnY9g3tXngDZ0ankZ2solS94t4jM+4Zk0SvU4eQ+p2U Ot276dgZJdoyAkTr8DO+jALz04nfSSSmKZpbeyyCVssxhkynnCXV1G8wI1TXCkmpg6QKxrm+Ew x2A67QJzz3Rd2BhM3yuva6rSUb9i9sJ26uzLvb+FgYU3x73X7hWXDaKrxDN9fXmyKQK+/Lg7B8 jIQ5YvrMQyMfK46s5HcMztn084kvuHLnMPt57+E623i5KU1Bg/5sdjzLRIIK1vzvxU3b1Dp4oC KE8=
- Ironport-sdr: ii0yFjUGTun+iyAzZbDRA06qRCC/uuCrxqtGZqvoZcr0vzAuKvuP2RV/l9PcudJenSwRj5gR+c Jdpg53ZFgEYb/gpNHcTaAJfBgruj8aIeDdotg1t0WmTuHt0nPmPZ91aBLM546OfKY+M8x0E+6Q xyarcEs/rZdUVCT85X6jWlEx+ljuTkyUkZxYKWzN3LXK5+05Wd/mndQEcwxt9q5HIUzVxUdpf6 D1QLddi6MIhzVzdZms35bBkFlY/JYi1gIz/wEKV4P+IF744/YVR7Y4LBaF1gdMS+5OnakAGjJ8 Vqk=
- References: <20191024204335.GA26512@troutmask.apl.washington.edu>
On 10/24/19 10:43 PM, Steve Kargl wrote:
The patch moves the matching of the nonstandard type-spec
BYTE to its own matching function. During this move, a
check for invalid matching in free-form source code it
detected (see byte_4.f90). OK to commit?
OK with a nit.
+ if (gfc_current_form == FORM_FREE)
+ {
+ char c = gfc_peek_ascii_char ();
+ if (!gfc_is_whitespace (c) && c != ',')
+ return MATCH_NO;
You also want to permit "byte::var", hence: c == ':' is also okay – you
can also add this as variant to the test case.
Cheers,
Tobias