From a339951e5f3c045290340330bcea3ff4155b8334 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 2 Mar 2018 14:26:58 +0100 Subject: pkg/compiler: add size attribute for structs The size attribute allows to pad a struct up to the specified size. --- pkg/compiler/testdata/errors.txt | 16 ++++++++++++++-- 1 file changed, 14 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 2b3a7539f..2d61d9e76 100644 --- a/pkg/compiler/testdata/errors.txt +++ b/pkg/compiler/testdata/errors.txt @@ -166,11 +166,23 @@ s8 { s9 { f1 int8 -} ["foo"[0]] ### bad struct/union attribute +} ["foo"[0]] ### unexpected string "foo", expect attribute s10 { f1 int8 -} [packed[0]] ### packed attribute had args +} [packed[0]] ### packed attribute has args + +s11 { + f1 int8 +} [size["foo"]] ### unexpected string "foo", expect int + +s12 { + f1 int8 +} [size[0:1]] ### size attribute has colon or args + +s13 { + f1 int8 +} [size[0[0]]] ### size attribute has colon or args u3 [ f1 int8 -- cgit mrf-deployment