http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396
Bug ID: 59396
Summary: [avr] Wrong warning with ISR() and -flto
Product: gcc
Version: 4.8.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: gjl at gcc dot gnu.org
Created attachment 31387
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31387&action=edit
isr.c: The C source
Following source will throw a warning if compiled, e.g.,
$ avr-gcc isr.c -mmcu=atmega8 -flto
#define __INTR_ATTRS used, externally_visible
#define ISR(vector,...) \
void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
void vector (void)
#define ADC_vect __vector_14
ISR (ADC_vect)
{
}
int main()
{
return 0;
}
The defines are copy-pased from AVR-Libc and are the most common way to define
interrupt service routines: Use ISR() with a isr vector name.
The warning is:
In function '__vector_14':
isr.c:10:1: warning: '_vector_14' appears to be a misspelled signal handler
[enabled by default]
ISR (ADC_vect)
^