2016-06-15 13:19 GMT+03:00 Pitchumani Sivanupandi <pitchumani.sivanupa...@atmel.com>: > On Mon, 2016-06-13 at 17:48 +0200, Georg-Johann Lay wrote: >> Pitchumani Sivanupandi schrieb: >> > >> > $ avr-gcc test.c -Wno-misspelled-isr >> > $ >> What about -Werror=misspelled-isr? > > Updated patch. > >> > >> > diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c >> > index ba5cd91..587bdbc 100644 >> > --- a/gcc/config/avr/avr.c >> > +++ b/gcc/config/avr/avr.c >> > @@ -753,7 +753,7 @@ avr_set_current_function (tree decl) >> > that the name of the function is "__vector_NN" so as to >> > catch >> > when the user misspells the vector name. */ >> > >> > - if (!STR_PREFIX_P (name, "__vector")) >> > + if ((!STR_PREFIX_P (name, "__vector")) && >> > (avr_warn_misspelled_isr)) >> > warning_at (loc, 0, "%qs appears to be a misspelled %s >> > handler", >> If, instead of the "0" the respective OPT_... enum is used in the >> call >> to warning_at, the -Werror= should work as expected (and explicit >> "&& >> avr_warn_misspelled_isr" no more needed). > > Ok. Updated patch as per the comments. > > If OK, could someone commit please? > > Regards, > Pitchumani > > gcc/ChangeLog > > 2016-06-15 Pitchumani Sivanupandi <pitchuman...@atmel.com> > > PR target/67353 > * config/avr/avr.c (avr_set_current_function): Warn misspelled > interrupt/ signal handler if -Wmisspelled-isr flag is enabled. > * 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.
Committed.