avr-protos.h (avr_addr_space_supported_p): New prototype.
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 20 Jul 2016 13:50:31 +0000 (13:50 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 20 Jul 2016 13:50:31 +0000 (13:50 +0000)
commit2d06ca74a23cc87d2edc983f24a196a815af1c01
treece0abd1f7dce44f3b5e61e8e4daa5a6b41940f05
parentb25ea150b6d2b9021f785ce4397e0ffe478b5a42
avr-protos.h (avr_addr_space_supported_p): New prototype.

gcc/
* config/avr/avr-protos.h (avr_addr_space_supported_p): New prototype.
* config/avr/avr.c (TARGET_ADDR_SPACE_DIAGNOSE_USAGE): New hook
define...
(avr_addr_space_diagnose_usage): ...and implementation.
(avr_addr_space_supported_p): New function.
(avr_nonconst_pointer_addrspace, avr_pgm_check_var_decl): Only
report bad address space usage if that space is supported.
(avr_insert_attributes): Same.  No more complain about unsupported
address spaces.
* config/avr/avr-c.c (tm_p.h): Include it.
(avr_cpu_cpp_builtins): Only define addr-space related built-in
macro if avr_addr_space_supported_p.

From-SVN: r238519
gcc/ChangeLog
gcc/config/avr/avr-c.c
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.c