You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, fix the mangling scheme of permissions ("" -> "-" when
permission not present) and, when checking for volatile qualifiers,
reach to pointee if type is pointer
__attribute__((cheriot_mmio("uart", "R"))) volatilestructUartuart3; // no warnings or errors, extern is implied
8
8
__attribute__((cheriot_mmio("uart"))) volatilestructUartuart4= {}; // expected-error{{global variable definition 'uart4' with attribute 'cheriot_mmio' cannot have an initializer}}
9
9
__attribute__((cheriot_mmio("uart"))) volatilestruct {intk;} uart5= {10}; // expected-error{{global variable definition 'uart5' with attribute 'cheriot_mmio' cannot have an initializer}}
10
+
__attribute__((cheriot_mmio("uart", "R"))) externvolatilestructUart*uart6; /* no warnings or errors*/
10
11
__attribute__((cheriot_shared_object("exampleK", "RR"))) externintexampleK; // expected-warning{{the permissions in 'cheriot_shared_object' contain a duplicate permission symbol: 'R' (value: 'RR')}}
11
12
__attribute__((cheriot_shared_object("exampleK", "m"))) externintexampleK; // expected-error{{the permissions in 'cheriot_shared_object' contain ill-formed dependencies: does not contain either read (R) or write (W) (value: 'm')}}
12
13
__attribute__((cheriot_shared_object("exampleK", "Wm"))) externintexampleK; // expected-error{{the permissions in 'cheriot_shared_object' contain ill-formed dependencies: contains mut (m) but does not have both read (R) and cap (c) (value: 'Wm')}}
13
14
__attribute__((cheriot_shared_object("exampleK", "R"))) intexampleK; // no warnings or errors, extern is implied
14
15
__attribute__((cheriot_shared_object("exampleK", "R"))) intexampleK2=10; // expected-error{{global variable definition 'exampleK2' with attribute 'cheriot_shared_object' cannot have an initializer}}
16
+
__attribute__((cheriot_shared_object("exampleK", "R"))) int*exampleK3; /* no warnings or errors */
0 commit comments