This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[patch, fortran, committed] PR36375, PR36377


Committed attached patches as obvious after bootstrapping and regtesting on 
i686-pc-linux-gnu (r136283).


2008-06-02  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/36375
	PR fortran/36377
	* cpp.c (gfc_cpp_init): Do not initialize builtins if processing
	already preprocessed input.
	(gfc_cpp_preprocess): Finalize output with newline.


Regards

	Daniel
Index: fortran/cpp.c
===================================================================
--- fortran/cpp.c	(revision 136256)
+++ fortran/cpp.c	(working copy)
@@ -524,6 +524,9 @@ gfc_cpp_init (void)
 {
   int i;
 
+  if (gfc_option.flag_preprocessed)
+    return;
+
   cpp_change_file (cpp_in, LC_RENAME, _("<built-in>"));
   if (!gfc_cpp_option.no_predefined)
     cpp_define_builtins (cpp_in);
Index: fortran/cpp.c
===================================================================
--- fortran/cpp.c	(revision 136256)
+++ fortran/cpp.c	(working copy)
@@ -574,6 +577,8 @@ gfc_cpp_preprocess (const char *source_f
       cpp_forall_identifiers (cpp_in, dump_macro, NULL);
     }
 
+  putc ('\n', print.outf);
+
   if (!gfc_cpp_preprocess_only ()
       || (gfc_cpp_preprocess_only () && gfc_cpp_option.output_filename))
     fclose (print.outf);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]