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: [PATCH] PR/16882: overload resolution of vector types


Gabriel Dos Reis wrote:

Paolo Bonzini <paolo.bonzini@polimi.it> writes:

| > I'm of the opinion that this should be handled the same way we do
| > for regular arrays. In particular the TYPE_MAIN_VARIANT should be the
| > array of the TYPE_MAIN_VARIANT of the element-type.
| | But if we do so, we print "const const __vector__ signed short" in the
| case of vector types.


Either you collapse repeated const or you diagnose it.

Vector types are more similar to complex types than to arrays, and what build_complex_type does is


TREE_TYPE (t) = TYPE_MAIN_VARIANT (component_type);

like build_vector_type does. In addition, build_vector_type builds a main variant, and it propagates the const and volatile qualifiers to the toplevel type but not to the main variant.

Paolo


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