Join GitHub today
VCC will not parse a literal negative number where INT is expected #2167
VCC should parse a literal negative number such as
The C typedef for VCL_INT is (signed) long, so it's not a problem with the data type, just the parser.
When VCC sees
Both of these workarounds will get a negative value into the INT:
If I'm reading the VCC code right, it looks like the CNUM type will have to permit the expression to begin with
Steps to Reproduce (for bugs)
Use a negative literal in VCL at any position where INT is expected.
VMOD development, but this is a general VCL issue.
Varnish trunk (but the problem has presumably always been there)