* lang.opt: Add support for -fbackslash option.
* options.c: Likewise.
* primary.c: Implement behavior for -fno-backslash.
* invoke.texi: Add doc for -fbackslash option.
* gfortran.texi: Remove mention of -fno-backslash as a
possible extension.
* gfortran.dg/backslash_1.f90: New test.
* gfortran.dg/backslash_2.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101216
138bc75d-0d04-0410-961f-
82ee72b054a4
-2005-06-20 Steven G. Kargl <kargls@comcast.net.
+2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * gfortran.h: Add flag_backslash compile-time option.
+ * lang.opt: Add support for -fbackslash option.
+ * options.c: Likewise.
+ * primary.c: Implement behavior for -fno-backslash.
+ * invoke.texi: Add doc for -fbackslash option.
+ * gfortran.texi: Remove mention of -fno-backslash as a
+ possible extension.
+
+2005-06-20 Steven G. Kargl <kargls@comcast.net>
(port from g95)
PR fortran/21257
int flag_pack_derived;
int flag_repack_arrays;
int flag_f2c;
+ int flag_backslash;
int q_kind;
names. The Fortran 95 standard does not distinguish them.
@item
-Compile switch for changing the interpretation of a backslash from a
-character to ``C''-style escape characters.
-
-@item
Compile flag to generate code for array conformance checking (suggest -CC).
@item
@cindex character set
Allow @samp{$} as a valid character in a symbol name.
+@cindex -fno-backslash option
+@cindex options, -fno-backslash
+@item -fno-backslash
+@cindex backslash
+@cindex escape characters
+@item
+Compile switch to change the interpretation of a backslash from
+``C''-style escape characters to a single backslash character.
+
@cindex -ffixed-line-length-@var{n} option
@cindex options, -ffixed-line-length-@var{n}
@item -ffixed-line-length-@var{n}
F95
Allow dollar signs in entity names
+fbackslash
+F95
+Specify that backslash in string introduces an escape character
+
fdump-parse-tree
F95
Display the code tree after parsing.
gfc_option.flag_no_backend = 0;
gfc_option.flag_pack_derived = 0;
gfc_option.flag_repack_arrays = 0;
+ gfc_option.flag_backslash = 1;
gfc_option.q_kind = gfc_default_double_kind;
gfc_option.flag_dollar_ok = value;
break;
+ case OPT_fbackslash:
+ gfc_option.flag_backslash = value;
+ break;
+
case OPT_fdump_parse_tree:
gfc_option.verbose = value;
break;
if (c == '\n')
return -2;
- if (c == '\\')
+ if (gfc_option.flag_backslash && c == '\\')
{
old_locus = gfc_current_locus;
+2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * gfortran.dg/backslash_1.f90: New test.
+ * gfortran.dg/backslash_2.f90: New test.
+
2005-06-20 Steven G. Kargl <kargls@comcast.net>
* gfortran.dg/duplicate_labels.f90: New test.
2005-06-19 Aldy Hernandez <aldyh@redhat.com>
- PR c++/22115
- * g++.dg/conversion/simd2.C: Change expected error message.
+ PR c++/22115
+ * g++.dg/conversion/simd2.C: Change expected error message.
2005-06-18 Dorit Nuzman <dorit@il.ibm.com>
--- /dev/null
+! { dg-do run }
+! { dg-options "-fno-backslash" }
+ character(len=4) a
+ open (10, status='scratch')
+ write (10,'(A)') '1\n2'
+ rewind (10)
+ read (10,'(A)') a
+ if (a /= '1\n2') call abort
+ end
--- /dev/null
+! { dg-do run }
+! { dg-options "-fbackslash" }
+ integer :: i, e
+ open (10, status='scratch')
+ write (10,'(A)') '1\n2'
+ rewind (10)
+ read (10,*,iostat=e) i
+ if (e /= 0 .or. i /= 1) call abort
+ read (10,*,iostat=e) i
+ if (e /= 0 .or. i /= 2) call abort
+ end