aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2024-03-22 17:29:21 +0100
committerGeorg-Johann Lay <avr@gjlay.de>2024-03-22 19:30:18 +0100
commit65b7d1862e11784a0ce67ab758e06dd8aa65b181 (patch)
tree42a58cea2fb0d3041a744e00a87fc5527d8b5819 /gcc
parent637e76b90e8b045c5e25206a41e3be55deace8d5 (diff)
downloadgcc-65b7d1862e11784a0ce67ab758e06dd8aa65b181.zip
gcc-65b7d1862e11784a0ce67ab758e06dd8aa65b181.tar.gz
gcc-65b7d1862e11784a0ce67ab758e06dd8aa65b181.tar.bz2
AVR: Adjust message for SIGNAL and INTERRUPT usage
gcc/ * config/avr/avr.cc (avr_set_current_function): Adjust diagnostic for deprecated SIGNAL and INTERRUPT usage without respective header.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/avr/avr.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index 12c5966..4a5a921 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -1495,14 +1495,20 @@ avr_set_current_function (tree decl)
// Common problem is using "ISR" without first including avr/interrupt.h.
const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
name = default_strip_name_encoding (name);
- if (strcmp ("ISR", name) == 0
- || strcmp ("INTERRUPT", name) == 0
- || strcmp ("SIGNAL", name) == 0)
+ if (strcmp ("ISR", name) == 0)
{
warning_at (loc, OPT_Wmisspelled_isr, "%qs is a reserved identifier"
" in AVR-LibC. Consider %<#include <avr/interrupt.h>%>"
" before using the %qs macro", name, name);
}
+ if (strcmp ("INTERRUPT", name) == 0
+ || strcmp ("SIGNAL", name) == 0)
+ {
+ warning_at (loc, OPT_Wmisspelled_isr, "%qs is a deprecated identifier"
+ " in AVR-LibC. Consider %<#include <avr/interrupt.h>%>"
+ " or %<#include <compat/deprecated.h>%>"
+ " before using the %qs macro", name, name);
+ }
#endif // AVR-LibC naming conventions
/* Don't print the above diagnostics more than once. */