shithub: scc

Download patch

ref: a73e9f76d9fd0691add07e42337884ee4a57cbef
parent: 8725d3f744980d3c1998a2fb7bbddb8daf640842
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Jul 19 05:46:56 EDT 2015

Add a space after the expansions of __FILE__ and __LINE__

This is needed in order to avoid concatenate with other
text in the input.

--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -196,11 +196,11 @@
 
 	macroname = sym->name;
 	if (sym == symfile) {
-		elen = sprintf(buffer, "\"%s\"", input->fname);
+		elen = sprintf(buffer, "\"%s\" ", input->fname);
 		goto substitute;
 	}
 	if (sym == symline) {
-		elen = sprintf(buffer, "%d", input->nline);
+		elen = sprintf(buffer, "%d ", input->nline);
 		goto substitute;
 	}