Akim Demaille wrote:
...
> Still I think some clarification of the documentation (of the attribute
> itself) is needed.  And maybe GCC should complain about violating 
> specifications.

I agree.  No "maybe", imho.

> akim@padam /tmp $ cat /tmp/bar.c
> #include <stdlib.h>
>
> __attribute__((pure))
> int
> foo()
> {
>   abort();
> }
> akim@padam /tmp $ gcc-mp-4.6 -O2 -Wsuggest-attribute=pure -c
> /tmp/bar.c -Wall -Wextra
> akim@padam /tmp $

That looks like a nice feature request.
Care to submit it to http://gcc.gnu.org/bugs/ ?

Reply via email to