[PATCH] align_value attribute in Clang

Richard Smith richard at metafoo.co.uk
Thu Sep 25 17:06:33 PDT 2014


I'd like some more information about how ICC treats this attribute. Does it produce a new type? For instance:

  typedef int *I32 __attribute__((align_value(32)));
  typedef int *I64 __attribute__((align_value(64)));

  typedef I32 X; typedef I64 X; // ill-formed?
  template<typename> struct Y;
  typedef Y<I32> Z; typedef Y<I64> Z; // ill-formed?

  extern I32 i32;
  I64 i64 = i32; // ill-formed? Is an explicit cast required?
  I32 i32 = i64; // ill-formed? Is there an implicit conversion that discards alignment?

... and if there's an implicit conversion that discards alignment, what is its conversion rank?

If I have:

  int n __attribute__((aligned(32)));

... then what is `decltype(&n)`? Is it `int*`, or `int* __attribute__((align_value(32)))`?

http://reviews.llvm.org/D4635






More information about the cfe-commits mailing list