avr port: allow "extern int a[] __attribute__(__progmem__);

Denis Chertykov denisc@overta.ru
Tue Oct 10 12:27:00 GMT 2000


Tue Oct 10 23:14:33 2000  Denis Chertykov  <denisc@overta.ru>

	* config/avr/avr.c (valid_machine_decl_attribute): Allow `extern'
	declaration for data with "progmem" attribute.


Index: config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.c,v
retrieving revision 1.25
diff -c -3 -p -r1.25 avr.c
*** avr.c	2000/10/10 18:41:18	1.25
--- avr.c	2000/10/10 19:26:42
*************** valid_machine_decl_attribute (decl, attr
*** 4318,4324 ****
    if (is_attribute_p ("progmem", attr)
        && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
      {
!       if (DECL_INITIAL (decl) == NULL_TREE)
  	{
  	  warning ("Only initialized variables can be placed into "
  		   "program memory area.");
--- 4318,4324 ----
    if (is_attribute_p ("progmem", attr)
        && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
      {
!       if (DECL_INITIAL (decl) == NULL_TREE && !DECL_EXTERNAL (decl))
  	{
  	  warning ("Only initialized variables can be placed into "
  		   "program memory area.");




More information about the Gcc-patches mailing list