Commit 89a5afda by Tobias Burnus Committed by Tobias Burnus

re PR fortran/34997 (Mention -fdollar-ok option in error message for symbol names containing $)

2008-02-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34997
        * match.c (gfc_match_name): Improve error message for '$'.

2008-02-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34997
        * gfortran.dg/dollar_sym_1.f90: New.
        * gfortran.dg/dollar_sym_2.f90: New.

From-SVN: r132488
parent 4cd8e76f
2008-02-20 Tobias Burnus <burnus@net-b.de>
PR fortran/34997
* match.c (gfc_match_name): Improve error message for '$'.
2008-02-19 Daniel Franke <franke.daniel@gmail.com>
PR fortran/35030
......
......@@ -519,6 +519,13 @@ gfc_match_name (char *buffer)
}
while (ISALNUM (c) || c == '_' || (gfc_option.flag_dollar_ok && c == '$'));
if (c == '$' && !gfc_option.flag_dollar_ok)
{
gfc_error ("Invalid character '$' at %C. Use -fdollar-ok to allow it as an extension");
return MATCH_ERROR;
}
buffer[i] = '\0';
gfc_current_locus = old_loc;
......
2008-02-20 Tobias Burnus <burnus@net-b.de>
PR fortran/34997
* gfortran.dg/dollar_sym_1.f90: New.
* gfortran.dg/dollar_sym_2.f90: New.
2008-02-20 Richard Guenther <rguenther@suse.de>
PR middle-end/35265
! { dg-do compile }
! PR fortran/34997
! Variable names containing $ signs
!
REAL*4 PLT$C_HOUSTPIX ! { dg-error "Invalid character '\\$'" }
INTEGER PLT$C_COMMAND ! { dg-error "Invalid character '\\$'" }
PARAMETER (PLT$B_OPC=0) ! { dg-error "Invalid character '\\$'" }
common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND ! { dg-error "Invalid character '\\$'" }
end
! { dg-do compile }
! { dg-options "-fdollar-ok" }
!
! PR fortran/34997
! Variable names containing $ signs
!
REAL*4 PLT$C_HOUSTPIX
INTEGER PLT$C_COMMAND
PARAMETER (PLT$B_OPC=0)
common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment