[cfe-commits] r79041 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Ted Kremenek
kremenek at apple.com
Fri Aug 14 15:50:38 PDT 2009
On Aug 14, 2009, at 3:48 PM, Ted Kremenek wrote:
> As for 'noreturn', Clang's handling of it is incorrect. Consider:
>
> $ cat t.c
> __attribute((noreturn)) void *(*fptr)();
> void *(*gptr)();
>
> void bar() {
> gptr = fptr;
> }
>
> $ gcc -fsyntax-only t.c
> t.c: In function ‘bar’:
> t.c:5: warning: assignment makes qualified function pointer from
> unqualified
>
> $ clang -fsyntax-only t.c
> (nothing)
>
The assignment actually is 'fptr = gptr'. I pasted the wrong code.
More information about the cfe-commits
mailing list