aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/errors.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-04 19:52:57 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-04 20:25:22 +0200
commit291192c61b4d6bad6c11e8732be7de26f1add0ef (patch)
tree6722975367c1730adb159a6f1c9a65027b3d1f81 /pkg/compiler/testdata/errors.txt
parente707c97f9a98166166f6ac1b11cd9a617aab8313 (diff)
pkg/compiler: don't allow bitfields in unions, args and anon types
Diffstat (limited to 'pkg/compiler/testdata/errors.txt')
-rw-r--r--pkg/compiler/testdata/errors.txt10
1 files changed, 8 insertions, 2 deletions
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