This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __attribute__ in types


> http://gcc.gnu.org/ml/gcc-patches/2001-12/msg00971.html

Ok.

I'd like you to add a gcc.dg test that at least tests for
lack of warning.  It may be possible to check that the
mode got applied properly, e.g.

#define small	__attribute__((mode(QI))) int
int main()
{
  int x, y = 0x400;

  x = (small) y;				/* { dg-bogus "ignored" } */
  if (sizeof (small) != sizeof (char))		/* { dg-bogus "ignored" } */
    abort ();
  if (sizeof (x) != sizeof (char) && x == y)
    abort ();
  return 0;
}


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]