On Nov 14, 2007, at 6:44 AM, Sanghyeon Seo wrote:
> C99 6.5.3.2p1 forbids taking address of register variable. However,
>
> struct entry { int value; };
> void add_one(int *p) { (*p)++; }
>
> void test() {
>  register struct entry *p;
>  add_one(&p->value);
> }
>
> This code isn't doing that. p is register variable, but p->value
> isn't. But current clang gives:
>
> test.c:6:11: error: address of register variable requested
>
> Such code is present in GNU Make 3.81.

Yep, you're right. Fixed, thanks!

-Chris
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to