From 291192c61b4d6bad6c11e8732be7de26f1add0ef Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 4 Sep 2017 19:52:57 +0200 Subject: pkg/compiler: don't allow bitfields in unions, args and anon types --- pkg/compiler/testdata/errors.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkg/compiler/testdata/errors.txt') diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt index dc535b000..512d615c8 100644 --- a/pkg/compiler/testdata/errors.txt +++ b/pkg/compiler/testdata/errors.txt @@ -63,7 +63,7 @@ sf2 = "a", "b" sf2 = "c" ### string flags sf2 redeclared, previously declared at errors.txt:62:1 resource r2[r0]: 2 -resource r3[int32:1] +resource r3[int32:1] ### unexpected ':', only struct fields can be bitfields resource r4[int32[opt]] ### resource base can't be marked as opt resource r5[non_existent] ### unknown type non_existent resource r9["foo"] ### unexpected string "foo", expect type @@ -108,7 +108,8 @@ foo$43(a ptr[in, string[1]]) ### unexpected int 1, string arg must be a string l foo$44(a int32) len[a] ### len can't be syscall return foo$45(a int32) len[b] ### len can't be syscall return foo$46(a ptr[in, in]) ### unknown type in -foo$47(a int32:2) ### unexpected ':' +foo$47(a int32:2) ### unexpected ':', only struct fields can be bitfields +foo$48(a ptr[in, int32:7]) ### unexpected ':', only struct fields can be bitfields opt { ### struct uses reserved name opt f1 int32 @@ -162,6 +163,11 @@ u4 [ f2 int32 ] [packed] ### unknown union u4 attribute packed +u5 [ + f1 int8:1 ### unexpected ':', only struct fields can be bitfields + f2 int8:2 ### unexpected ':', only struct fields can be bitfields +] + define d0 SOMETHING define d1 `some C expression` define d2 some C expression -- cgit mrf-deployment