[cfe-commits] patch for review

Dmitri Gribenko gribozavr at gmail.com
Sat Jan 12 10:33:46 PST 2013


On Sat, Jan 12, 2013 at 8:08 PM, Reed Kotler <rkotler at mips.com> wrote:
> Okay. Thanks.
>
> The reason why I added the
>
> -triple x86_64-unknown-linux-gnu
>
> is because it's possible to run make check on a Mips platform. We even have
> a build bot connected
> to llvm what runs make-check on a mips board. This is why I had two
> different test cases.

Oh, I see.  Makes sense, except for the error message -- it is not
really helpful.  It does not suggest that the issue is the wrong
target.  But that might be a common issue with all target-specific
attrs...

> mips16, nomips16 should emit warnings except when it is a mips target.

Why not an error?  What does GCC in the same case?

> I will add Subjects=. I had that originally but it seemed to be causing
> problems. There might have been some other reason for that. I will try
> adding it back in. It might have been some kind of make bug for clang. Long
> story... but I will recheck.

Please also add code and tests to reject the attribute with an error
if it is applied to a variable, data member, class, struct or union.

And you can add a C++ test for attribute applied to a member function.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list