Ping #1: [Patch, AVR]: Fix PR34734

Georg-Johann Lay
Tue Jun 28 12:00:00 GMT 2011

Georg-Johann Lay wrote:
> PR34734 produces annoying, false warnings if __attribute__((progmem))
> is used in conjunction with C++.  DECL_INITIAL is not yet set up in
> avr_handle_progmem_attribute.
> Johann
> 	PR target/34734
> 	* config/avr/avr.c (avr_handle_progmem_attribute): Move warning
> 	about uninitialized data attributed 'progmem' from here...
> 	(avr_encode_section_info): this new function.
> 	(avr_section_type_flags): For data in "", remove
> 	section flag SECTION_WRITE.

avr_encode_section_info is good place to emit the warning:
DECL_INITIAL has stabilized for C++, the warning will appear even for
unused variables that will eventually be thrown away, and the warning
appears only once (new_decl_p).


More information about the Gcc-patches mailing list