This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

cppfiles.c: zero-length file fix (and -dM etc.)


This seems to have crept in to the file-caching work a few days ago.
It looks like a bogus copy / paste of code, where the code takes on
different meaning in the new location.

Sould fix:-

1) -dM now works
2) Linux kernel makefile problem report
3) Ulrich's zero-length file returns error code report.

OK to commit if it bootstraps?

Neil.

	* cppfiles.c (read_include_file): Take no special action for
	zero-length files.

Index: cppfiles.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppfiles.c,v
retrieving revision 1.80
diff -u -p -r1.80 cppfiles.c
--- cppfiles.c	2000/09/16 18:17:53	1.80
+++ cppfiles.c	2000/09/19 07:03:36
@@ -331,12 +331,6 @@ read_include_file (pfile, inc)
       if (count < 0)
 	goto perror_fail;
 
-      if (offset == 0)
-	{
-	  free (buf);
-	  return 0;
-	}
-
       if (offset < size)
 	buf = xrealloc (buf, offset);
       inc->st.st_size = offset;

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