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 14:37:59 +0100 (BST)
- Subject: Re: How to fix AVR progmem type attribute?
On Thu, 23 May 2002, Marek Michalkiewicz wrote:
> Now, the "typedef" causes a warning: `progmem' attribute ignored
> to be printed in config/avr/avr.c (avr_handle_progmem_attribute),
> and table is placed in the data section (prog_int works like int).
> But, disabling the "*no_add_attrs = true;" where the warning is
> printed is not sufficient. Something else is still wrong - the
> attribute is still not inherited from the type to the variable.
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.
--
Joseph S. Myers
jsm28@cam.ac.uk