[cfe-commits] mips16/nomips16 attr

Richard Smith richard at metafoo.co.uk
Mon Jan 14 14:37:16 PST 2013


+def Mips16 : InheritableAttr {
+  let Spellings = [GNU<"mips16">];
+  let Subjects = [Function];

Attributes which g++-4.8 accepts should also have a CXX11<"gnu", "mips16">
spelling.

On Mon, Jan 14, 2013 at 2:31 PM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> 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>*/
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130114/e53f5617/attachment.html>


More information about the cfe-commits mailing list