Fix correct line number reporting in errors/warnings when a macro definition ends with '/' and it is not the end of a C comment - swig.swg has some of these macro definitions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f82811dbcd
commit
efb9090a87
6 changed files with 23 additions and 1 deletions
|
|
@ -78,6 +78,8 @@ pp_constant.i:23: Warning 305: Bad constant value (ignored).
|
|||
pp_constant.i:29: Warning 305: Bad constant value (ignored).
|
||||
pp_constant.i:35: Warning 305: Bad constant value (ignored).
|
||||
pp_constant.i:42: Warning 305: Bad constant value (ignored).
|
||||
pp_constant.i:46: Warning 305: Bad constant value (ignored).
|
||||
pp_constant.i:49: Warning 305: Bad constant value (ignored).
|
||||
|
||||
:::::::::::::::::::::::::::::::: pp_defined.i :::::::::::::::::::::::::::::::::::
|
||||
pp_defined.i:6: Error: No arguments given to defined()
|
||||
|
|
|
|||
|
|
@ -41,3 +41,10 @@ comment */
|
|||
|
||||
%constant int fff=;
|
||||
|
||||
// Test macro ending in /, that is not a C comment terminator
|
||||
#define G1 1234
|
||||
#define G2 1234 /
|
||||
#define G3 1234
|
||||
|
||||
%constant int ggg=;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,5 +60,9 @@ public class preproc_line_file_runme {
|
|||
String inlineFile = preproc_line_file.INLINE_FILE;
|
||||
if (!(inlineFile.equals(FILENAME_UNIX) || inlineFile.equals(FILENAME_WINDOWS)))
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
if (Slash.LINE_NUM != 93)
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,3 +87,9 @@ KLASS(SillyMultipleMacroStruct)
|
|||
#define INLINE_LINE __LINE__
|
||||
%}
|
||||
|
||||
#define MACRO_END_WITH_SLASH ABCD/
|
||||
|
||||
%inline %{
|
||||
KLASS(Slash)
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue