From 255c929c5636f54c16261bd92b8eea2005d61b11 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Mon, 1 Sep 2014 00:26:15 -0300 Subject: [PATCH] Issue an error for unknown SWIG preprocessor directives, rather than quietly ignoring them. Reported by jrhelsey in issue#217. --- CHANGES.current | 4 ++++ Source/Preprocessor/cpp.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.current b/CHANGES.current index 6ce431b60..cf57d393e 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release. Version 3.0.3 (in progress) =========================== +2014-09-01: olly + Issue an error for unknown SWIG preprocessor directives, rather + than quietly ignoring them. Reported by jrhelsey in issue#217. + 2014-08-15: talby [Perl] Include guard fix for nested modules from Anthony Heading (SF Patch #350). diff --git a/Source/Preprocessor/cpp.c b/Source/Preprocessor/cpp.c index baadf7132..1ca549703 100644 --- a/Source/Preprocessor/cpp.c +++ b/Source/Preprocessor/cpp.c @@ -1768,6 +1768,8 @@ String *Preprocessor_parse(String *s) { } } else if (Equal(id, kpp_level)) { Swig_error(Getfile(s), Getline(id), "cpp debug: level = %d, startlevel = %d\n", level, start_level); + } else { + Swig_error(Getfile(s), Getline(id), "Unknown SWIG preprocessor directive: %s\n", id); } for (i = 0; i < cpp_lines; i++) Putc('\n', ns);