On 16/06/15 10:52, Eric Botcazou wrote: > This is the testsuite part. > > testsuite/ > * c-c++-common/sso-1.c: New test. > * c-c++-common/sso: New directory. > * gcc.dg/sso-1.c: New test. > * g++.dg/sso-1.C: Likewise. > * gcc.dg/sso: New directory. > * g++.dg/sso: Likewise. > * gnat.dg/sso1.adb: New test. > * gnat.dg/sso2.ad[sb]: Likewise. > * gnat.dg/sso3.adb: Likewise. > * gnat.dg/sso4.adb: Likewise. > * gnat.dg/sso5.adb: Likewise. > * gnat.dg/sso6.adb: Likewise. > * gnat.dg/sso7.adb: Likewise. > * gnat.dg/specs/sso1.ads: Likewise. > * gnat.dg/specs/sso2.ads: Likewise. > * gnat.dg/sso: New directory. >
It appears that all the C tests check the specific syntactic form 'struct __attr_sso__ foo {...};' What is the impact of changing the location of __attr_sso__? Eg: struct foo {...} __attr_sso__; (Note that alignment attributes can have significant impact depending on where in the syntax the attribute is placed (I'm expecting this will be true here as well). What about with typedefs? Can I apply the attribute to a previously laid out struct? Can I apply it to individual fields in the struct, eg: struct bar { int a; int __attr_sso__ b; }; Can I modify an existing struct to create an opposite endian variant? Eg. struct bar { int a; }; struct wibble { struct __attr_sso__ bar a; }; Assuming mixed fields in a struct are possible, can it be applied to individual bitfields? What is the impact on mixing big and little endian bitfields in the same structure. R.