re PR target/67353 ([avr] Option-ize Warning "appears to be a misspelled signal / interrupt handler")

PR target/67353
    * config/avr/avr.c (avr_set_current_function): Warn misspelled
    interrupt/ signal handler if -Wmisspelled-isr flag is enabled.

From-SVN: r237486
This commit is contained in:
Pitchumani Sivanupandi 2016-06-15 16:40:07 +00:00 committed by Denis Chertykov
parent 10c619de35
commit 22fba35255
4 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2016-06-15 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
PR target/67353
* config/avr/avr.c (avr_set_current_function): Warn misspelled
interrupt/ signal handler if -Wmisspelled-isr flag is enabled.
2016-06-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2016-06-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_<sur>shll_n<mode>): Clean * config/aarch64/aarch64-simd.md (aarch64_<sur>shll_n<mode>): Clean

View File

@ -754,8 +754,8 @@ avr_set_current_function (tree decl)
when the user misspells the vector name. */ when the user misspells the vector name. */
if (!STR_PREFIX_P (name, "__vector")) if (!STR_PREFIX_P (name, "__vector"))
warning_at (loc, 0, "%qs appears to be a misspelled %s handler", warning_at (loc, OPT_Wmisspelled_isr, "%qs appears to be a misspelled "
name, isr); "%s handler, missing __vector prefix", name, isr);
} }
/* Don't print the above diagnostics more than once. */ /* Don't print the above diagnostics more than once. */

View File

@ -91,6 +91,10 @@ Waddr-space-convert
Warning C Report Var(avr_warn_addr_space_convert) Init(0) Warning C Report Var(avr_warn_addr_space_convert) Init(0)
Warn if the address space of an address is changed. Warn if the address space of an address is changed.
Wmisspelled-isr
Warning C C++ Report Var(avr_warn_misspelled_isr) Init(1)
Warn if the ISR is misspelled, i.e. without __vector prefix. Enabled by default.
mfract-convert-truncate mfract-convert-truncate
Target Report Mask(FRACT_CONV_TRUNC) Target Report Mask(FRACT_CONV_TRUNC)
Allow to use truncation instead of rounding towards 0 for fractional int types. Allow to use truncation instead of rounding towards 0 for fractional int types.

View File

@ -643,7 +643,8 @@ Objective-C and Objective-C++ Dialects}.
@emph{AVR Options} @emph{AVR Options}
@gccoptlist{-mmcu=@var{mcu} -maccumulate-args -mbranch-cost=@var{cost} @gol @gccoptlist{-mmcu=@var{mcu} -maccumulate-args -mbranch-cost=@var{cost} @gol
-mcall-prologues -mint8 -mn_flash=@var{size} -mno-interrupts @gol -mcall-prologues -mint8 -mn_flash=@var{size} -mno-interrupts @gol
-mrelax -mrmw -mstrict-X -mtiny-stack -nodevicelib -Waddr-space-convert} -mrelax -mrmw -mstrict-X -mtiny-stack -nodevicelib -Waddr-space-convert @gol
-Wmisspelled-isr}
@emph{Blackfin Options} @emph{Blackfin Options}
@gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol @gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
@ -14586,12 +14587,17 @@ Only change the lower 8@tie{}bits of the stack pointer.
@item -nodevicelib @item -nodevicelib
@opindex nodevicelib @opindex nodevicelib
Don't link against AVR-LibC's device specific library @code{libdev.a}. Don't link against AVR-LibC's device specific library @code{lib<mcu>.a}.
@item -Waddr-space-convert @item -Waddr-space-convert
@opindex Waddr-space-convert @opindex Waddr-space-convert
Warn about conversions between address spaces in the case where the Warn about conversions between address spaces in the case where the
resulting address space is not contained in the incoming address space. resulting address space is not contained in the incoming address space.
@item -Wmisspelled-isr
@opindex Wmisspelled-isr
Warn if the ISR is misspelled, i.e. without __vector prefix.
Enabled by default.
@end table @end table
@subsubsection @code{EIND} and Devices with More Than 128 Ki Bytes of Flash @subsubsection @code{EIND} and Devices with More Than 128 Ki Bytes of Flash