summaryrefslogtreecommitdiff
path: root/data/c.m4
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny@ces.clemson.edu>2006-08-10 01:18:50 +0000
committerJoel E. Denny <jdenny@ces.clemson.edu>2006-08-10 01:18:50 +0000
commit06e8700a000fb661a3d15db8e1dfeb6bfcccf86d (patch)
tree857dc3e7eb2b0c9e69a727c88d6f6dfdc9109a2b /data/c.m4
parent9c4371263f358161fc30283817dc60284d86075e (diff)
downloadbison-06e8700a000fb661a3d15db8e1dfeb6bfcccf86d.tar.gz
Suppress signed/unsigned comparison warnings for yycheck.
* data/c.m4 (b4_safest_int_type): New macro. * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against a signed int type, cast it to b4_safest_int_type first. * data/yacc.c: Likewise. (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is also overwritten.
Diffstat (limited to 'data/c.m4')
-rw-r--r--data/c.m45
1 files changed, 5 insertions, 0 deletions
diff --git a/data/c.m4 b/data/c.m4
index 2ef88b15..2f29b39f 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -164,6 +164,11 @@ m4_define([b4_int_type],
[int])])
+# b4_safest_int_type
+# ------------------
+# The safest int type to cast to when it's necessary to compare a signed int
+# type against an int type set by b4_int_type.
+m4_define([b4_safest_int_type],[int])
# b4_int_type_for(NAME)
# ---------------------