This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to fix AVR progmem type attribute?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Marek Michalkiewicz <marekm at amelek dot gda dot pl>
- Cc: <gcc at gcc dot gnu dot org>, <denisc at overta dot ru>
- Date: Thu, 23 May 2002 21:46:56 +0100 (BST)
- Subject: Re: How to fix AVR progmem type attribute?
On Thu, 23 May 2002, Marek Michalkiewicz wrote:
> > Try explicitly handling TYPE_DECL, and arranging for the type to be
> > modified in that case (using build_type_attribute_variant) rather than the
> > decl.
>
> Are there any examples (in some other target perhaps) how this should
> be done? I'm a bit confused...
For example, arm/arm.c:arm_handle_isr_attribute modifies the target type
of a pointer type.
In general, the cases where target attributes apply to both decls and
types should at best have an implementation with table-driven attributes
that is bug-compatible with the old implementation - but it would be a
good idea to go over the exact meaning of the attributes, write testcases
for them, and make sure that the implementation does exactly what's
intended. (Table-driven attributes are at least as flexible as the old
system; there may be cases where the exact semantics wanted can be better
expressed with them than they were expressed previously.)
The attribute in question also seems to be lacking any documentation.
--
Joseph S. Myers
jsm28@cam.ac.uk