[cfe-commits] mips16/nomips16 attr

Dmitri Gribenko gribozavr at gmail.com
Mon Jan 14 14:31:19 PST 2013


On Mon, Jan 14, 2013 at 8:42 AM, Reed Kotler <rkotler at mips.com> wrote:
> Forget to say that I need to have this patch reviewd.

+__attribute((nomips16)) int a; // expected-warning {{attribute only
applies to functions}}

I am concerned by the fact that this is just a warning -- I would
suggest to make it an error.  This is a new attribute, so there's no
code abusing this attribute (we don't need to be compatible with it).

What does gcc do?

+void __attribute__((nomips16)) foo32(); // expected-warning {{unknown
attribute 'nomips16' ignored}}

Same here.  What does gcc do in this case?  (I know that this behavior
can not be changed without some refactoring.  But if GCC gives an
error, we should, too.  So we would leave a comment in the test, or
better -- do the required refactoring...)

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