re PR fortran/30452 ([4.2, 4.1 only] Strange syntax error with high-value character)
2007-01-14 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/30452 * scanner.c(next_char): Cast next character to unsigned to avoid confusion with error return codes. 2007-01-14 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/30452 * gfortran.dg/string_0xfe_0xff_1.f90: New test. From-SVN: r120768
This commit is contained in:
parent
326648f1bd
commit
16a374c6c8
@ -345,7 +345,7 @@ next_char (void)
|
||||
if (gfc_current_locus.nextc == NULL)
|
||||
return '\n';
|
||||
|
||||
c = *gfc_current_locus.nextc++;
|
||||
c = (unsigned char) *gfc_current_locus.nextc++;
|
||||
if (c == '\0')
|
||||
{
|
||||
gfc_current_locus.nextc--; /* Remain on this line. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-01-14 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
PR fortran/30452
|
||||
* gfortran.dg/string_0xfe_0xff_1.f90: New test.
|
||||
|
||||
2007-01-13 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* gcc.dg/20070112-1.c: New test.
|
||||
|
7
gcc/testsuite/gfortran.dg/string_0xfe_0xff_1.f90
Normal file
7
gcc/testsuite/gfortran.dg/string_0xfe_0xff_1.f90
Normal file
@ -0,0 +1,7 @@
|
||||
! { dg-do compile }
|
||||
! PR 30452 - this used to cause syntax errors due to the presence,
|
||||
! as characters, of bytes 0xfe and 0xff.
|
||||
program main
|
||||
if (char (254) /= "þ") call abort
|
||||
if (achar (255) /= "ÿ") call abort
|
||||
end program main
|
Loading…
Reference in New Issue
Block a user