# HG changeset patch # User David A. Holland # Date 1370921617 14400 # Node ID 408331be879220fe40860f28d8d1b4a23f9a9722 # Parent 1c0575f7dd46d70355c6fe587f56378c83b8bb32 Accept [UL]* after integer constants. diff -r 1c0575f7dd46 -r 408331be8792 eval.c --- a/eval.c Mon Jun 10 23:33:15 2013 -0400 +++ b/eval.c Mon Jun 10 23:33:37 2013 -0400 @@ -613,11 +613,19 @@ if (word[0] >= '0' && word[0] <= '9') { errno = 0; val = strtoul(word, &t, 0); - if (errno || *t != '\0') { + if (errno) { complain(p, "Invalid integer constant"); complain_fail(); return 0; } + while (*t == 'U' || *t == 'L') { + t++; + } + if (*t != '\0') { + complain(p, "Trailing garbage after integer constant"); + complain_fail(); + return 0; + } if (val > INT_MAX) { complain(p, "Integer constant too large"); complain_fail();