This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: handling of mode attribute
On Sun, 27 Sep 2009, Kai Tietz wrote:
> You are right that the initial point for this patch was to have new
> types, which are combine-able with type specifiers, like
> unsigned/signed/_Complex. To have the ability to define such types in
> target scope would be of course the best, but as far as I can see the
> current type-system in C/C++ FE doesn't provide this pretty easily. Eg
That is a misconception. Allowing new type specifier keywords (a limited
set, where some targets may not support some types) is easy, and much
simpler than inventing new attributes that do not bind in the normal way
documented for attributes, as well as a more natural match for the actual
problem to be solved. These keywords are pretty similar to char, int,
float, double, void or _Bool; they can be used with certain other type
specifier keywords under easy to specify rules.
--
Joseph S. Myers
joseph@codesourcery.com