[patch, avr] Fix PR67353

Pitchumani Sivanupandi pitchumani.sivanupandi@atmel.com
Mon Jun 13 08:08:00 GMT 2016


On Fri, 2016-06-10 at 20:08 +0200, Georg-Johann Lay wrote:
> Pitchumani Sivanupandi schrieb:
> > 
> > Hi,
> > 
> > This patch introduces new flags for warning 'misspelled interrupt/
> > signal handler'. Flag -Wmisspelled-isr is enabled by default and it
> > will warn user if the interrupt/ signal handler is without
> > '__vector'
> > prefix. Flag -Wno-misspelled-isr shall be enabled by user to allow
> > custom names, i.e. without __vector prefix.
> > 
> > // avr-gcc -c test.c
> > void custom_interruption(void) __attribute__((signal));
> > void custom_interruption(void) {}
> > 
> > Behavior after applying this patch:
> > 
> > $ avr-gcc test.c 
> > test.c: In function 'custom_interruption':
> > test.c:2:6: warning: 'custom_interruption' appears to be a
> > misspelled
> > signal handler
> >  void custom_interruption(void) {}
> >       ^~~~~~~~~~~~~~~~~~~
> > 
> > $ avr-gcc test.c -Wmisspelled-isr
> > test.c: In function
> > 'custom_interruption':
> > test.c:2:6: warning: 'custom_interruption'
> > appears to be a misspelled signal handler
> >  void
> > custom_interruption(void) {}
> >       ^~~~~~~~~~~~~~~~~~~
> > 
> > $ avr-gcc test.c -Wno-misspelled-isr
> > $
> > 
> > If OK, could someone commit please? I do not have commit access.
> > 
> > Regards,
> > Pitchumani
> > 
> > gcc/ChangeLog
> > 
> > 2016-06-10  Pitchumani Sivanupandi  <pitchumani.s@atmel.com>
> > 
> Missing PR target/67353
> > 
> >     * config/avr/avr.c (avr_set_current_function): Warn misspelled
> >     interrupt/ signal handler if warn_misspelled_isr flag is set.
> >     * config/avr/avr.opt (Wmisspelled-isr): New warning flag.
> > Enabled
> >     by default to warn misspelled interrupt/ signal handler.
> Shouldn't it also be documented in doc/invoke.texi?

Thanks Johann.

Updated the patch. Updated description for -nodevicelib option
as well, device library should be lib<mcu>.a.

Regards,
Pitchumani

gcc/ChangeLog

2016-06-10  Pitchumani Sivanupandi  <pitchumani.s@atmel.com>

    PR target/67353
    * config/avr/avr.c (avr_set_current_function): Warn misspelled
    interrupt/ signal handler if warn_misspelled_isr flag is set.
    * config/avr/avr.opt (Wmisspelled-isr): New warning flag. Enabled
    by default to warn misspelled interrupt/ signal handler.
    * doc/invoke.texi (AVR Options): Document it. Update description
    for -nodevicelib option.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr67353.patch
Type: text/x-patch
Size: 2490 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160613/a7ddd84e/attachment.bin>


More information about the Gcc-patches mailing list