File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Examples/test-suite/errors Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 41
41
#if (1)
42
42
#warning Warning okay: #if(1)
43
43
#endif
44
+
45
+ /* The SWIG preprocessor support strings with equality/inequality tests.
46
+ * Check error cases.
47
+ */
48
+ #if "TWO" == 1
49
+ #endif
50
+
51
+ /* This didn't fail prior with SWIG < 4.1. Github #1384. */
52
+ #if 1 == (" TWO" )
53
+ #endif
Original file line number Diff line number Diff line change @@ -17,3 +17,7 @@ pp_expressions_bad.i:30: Error: Extraneous #endif.
17
17
pp_expressions_bad.i:32: Error: Unknown SWIG preprocessor directive: if456e (if this is a block of target language code, delimit it with %{ and %})
18
18
pp_expressions_bad.i:33: Error: Extraneous #endif.
19
19
pp_expressions_bad.i:42: Warning 204: CPP #warning, "Warning okay: #if(1)".
20
+ pp_expressions_bad.i:48: Warning 202: Could not evaluate expression '"TWO" == 1'
21
+ pp_expressions_bad.i:48: Warning 202: Error: 'Can't mix strings and integers in expression'
22
+ pp_expressions_bad.i:52: Warning 202: Could not evaluate expression '1 == ("TWO")'
23
+ pp_expressions_bad.i:52: Warning 202: Error: 'Can't mix strings and integers in expression'
You can’t perform that action at this time.
0 commit comments