From ec579bb3346c12024f2f678b2e05144fa81dedc6 Mon Sep 17 00:00:00 2001 From: evans1629 Date: Sun, 10 Feb 2002 23:25:10 +0000 Subject: [PATCH] Fixed bug with unrecognized files in #line commands. --- src/cpperror.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cpperror.c b/src/cpperror.c index 14fcd8a..cd797ed 100644 --- a/src/cpperror.c +++ b/src/cpperror.c @@ -254,8 +254,15 @@ cppReader_getLoc (cppReader *pfile) cstring fname = ip->nominal_fname; fileId fid = fileTable_lookup (context_fileTable (), fname); - llassert (fileId_isValid (fid)); - + if (!fileId_isValid (fid)) + { + /* evans 2002-02-09 + ** filename used in #line comment is new + */ + + fid = fileTable_addFile (context_fileTable (), fname); + } + cppBuffer_lineAndColumn (ip, &line, &col); return fileloc_create (fid, line, col); -- 2.45.2