aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/errors.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-04-14 07:00:48 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-04-19 10:26:57 +0200
commit0781895e0f8359843b9215ac6ad16925a46b2703 (patch)
treea5426f1e935325ab395dc610ad44e4342613241e /pkg/compiler/testdata/errors.txt
parenta116470dc3f3852a062312c93ebc8f2452027133 (diff)
pkg/compiler: refactor attribute handling
Introduce common infrastructure for describing and parsing attribute instead of custom per-attribute code scattered across several locations. Change align attribute syntax from the weird align_N to align[N]. This also allows to use literal constants as N. Introduce notion of builtin constants. Currently we have only PTR_SIZE, which is needed to replace align_ptr with align[PTR_SIZE].
Diffstat (limited to 'pkg/compiler/testdata/errors.txt')
-rw-r--r--pkg/compiler/testdata/errors.txt12
1 files changed, 2 insertions, 10 deletions
diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt
index d5611a531..3b77ed4b9 100644
--- a/pkg/compiler/testdata/errors.txt
+++ b/pkg/compiler/testdata/errors.txt
@@ -152,20 +152,12 @@ s3 {
f7 int32:33 ### bitfield of size 33 is too large for base type of size 32
f8 const[0, int32:C1] ### literal const bitfield sizes are not supported
f9 const[0] ### wrong number of arguments for type const, expect value, base type
-} [packed, align_4]
-
-s4 {
- f1 int8
-} [align_7] ### bad struct s4 alignment 7 (must be a sane power of 2)
+} [packed, align[4]]
s5 {
f1 int8
} [varlen] ### unknown struct s5 attribute varlen
-s6 {
- f1 int8
-} [align_foo] ### bad struct s6 alignment foo
-
s7 {
f1 ptr64[in, int32]
}
@@ -298,7 +290,7 @@ type templ_struct0[A, B] {
len len[parent, int16]
typ const[A, int16]
data B
-} [align_4]
+} [align[4]]
type templ_struct1[STR] {
f string[STR, 40]