Herman ten Brugge via Tinycc-devel wrote:
The problem is that packed structeres should probably always use
single_byte code.
For example:
-----
struct __attribute__((packed)) {
  char a;
  int b;
} s;

int
main(void)
{
  s.b = 3;
}
-----
Also fails to run on arm32 (openbsd).
I do not have a solution. But maybe Grischka can solve this?

Don't know, maybe look what gcc does?

However, with your example, for example, one could take the address
    int *p = &s.b;
and pass that to other functions, as well.  There is not much
that the compiler could do.

For the 96_nodata_wanted test using 'packed' or not probably would
not make much difference, at least on ARM.  Maybe it was supposed
to test single-byte access under code suppression.  But why shouldn't
it work anyway.

--- grischka


    Herman


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to