[cfe-users] Pure attribute

Seth Cantrell seth.cantrell at gmail.com
Mon Mar 10 14:59:15 PDT 2014


Unless this attribute has been added since last week I don't think it
is supported. I get a warning "unknown attribute 'pure' ignored".

You might try compiling a test program which should fail due to not
being pure, rather than one which should work. That's a better test to
see if the attribute does anything. You can also use the -Weverything
flag to be sure you see any warnings.

> On Mar 10, 2014, at 1:54 PM, Daniel Mosesson <dmosess1 at binghamton.edu> wrote:
>
> As far as I can tell, the pure attribute works (the following code
> compiles), but where is the documentation for it?
>
> [[clang::pure]]
> int f(){return 5;}
> int main() {
>    return 0;
> }
>
> _______________________________________________
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users



More information about the cfe-users mailing list