VCC should parse a literal negative number such as -10 where an INT is expected.
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 -, it emits this error message and fails the parse:
Message from VCC-compiler: Unknown token '-' when looking for INT
Both of these workarounds will get a negative value into the INT:
0 - 1 # i.e. 1 subtracted from 0
std.integer("-10", -10) doesn't work, because INT is specified for the fallback parameter, so the same error is raised.
If I'm reading the VCC code right, it looks like the CNUM type will have to permit the expression to begin with -. And it that case the conversion will have to negate the result of vcc_UintVal(), which currently returns unsigned (and the comments say that it expects digits only).
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)
One slightly less annoying way of doing it is to trick the parser with a substraction:
Allow INT and REAL to be negative.