From 2e9037c55f6a3308190ab4eb0ce110dddc7a6f2b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 17 Mar 2020 14:32:13 +0100 Subject: pkg/compiler: check that const values fit into base type const[0x12345678, int8] is always an error, detect these cases. Found some bugs in mptcp, socket proto and fuchsia fidl descriptions. --- pkg/compiler/testdata/errors3.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/compiler/testdata/errors3.txt') diff --git a/pkg/compiler/testdata/errors3.txt b/pkg/compiler/testdata/errors3.txt index 65bd20092..3221ee5dc 100644 --- a/pkg/compiler/testdata/errors3.txt +++ b/pkg/compiler/testdata/errors3.txt @@ -6,6 +6,9 @@ discrimination(a int32) discrimination$1(a int16) ### discrimination$1 arg a is redeclared with size 2, previously declared with size 4 at LOCATION +arg_size$1(a int16) +arg_size$2(a const[0x12345]) ### const val 0x12345 does not fit into 16 bits + bad_size_attr_struct { a int64 } [size[4]] ### struct bad_size_attr_struct has size attribute 4 which is less than struct size 8 -- cgit mrf-deployment