This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, avr] Fix PR67353
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Pitchumani Sivanupandi <pitchumani dot sivanupandi at atmel dot com>
- Cc: Georg-Johann Lay <avr at gjlay dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- Date: Wed, 15 Jun 2016 19:43:54 +0300
- Subject: Re: [patch, avr] Fix PR67353
- Authentication-results: sourceware.org; auth=none
- References: <1465546372 dot 2691 dot 26 dot camel at atmel dot com> <575ED5DB dot 5080803 at gjlay dot de> <1465985940 dot 2555 dot 6 dot camel at atmel dot com>
2016-06-15 13:19 GMT+03:00 Pitchumani Sivanupandi
<pitchumani.sivanupandi@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 <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.
> * 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.