[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] minor tcc bug: sizeof operator handling
From: |
Marc Andre Tanner |
Subject: |
Re: [Tinycc-devel] minor tcc bug: sizeof operator handling |
Date: |
Sat, 22 Nov 2008 13:59:29 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sat, Nov 22, 2008 at 12:30:40PM +0100, Masha Rabinovich wrote:
> struct S
> {
> char b[128];
> };
>
> main()
> {
> struct S s, *ps;
> printf("%d\n", sizeof s.b); // ok
> printf("%d\n", sizeof ps->b); // ok
> printf("%d\n", sizeof (s.b)); // ok
> printf("%d\n", sizeof (ps->b)); // ok
> printf("%d\n", sizeof ((s).b)); // ok
> printf("%d\n", sizeof ((ps)->b));// ok
> printf("%d\n", sizeof (s).b); // fail
> printf("%d\n", sizeof (ps)->b); // fail
> }
This seems to be the same issue I reported some time ago regarding the
precedence of the sizeof operator.
http://www.mail-archive.com/address@hidden/msg01471.html
Cheers,
Marc
--
Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0