avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Warning messages


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Warning messages
Date: Mon, 3 Mar 2008 20:52:56 +0100
User-agent: Mutt/1.5.11

(This is all related to GCC rather tahn avr-libc, so I redirected it
to avr-gcc-list.  Please mind the mail-followup-to when continuing the
discussion.)

As Ron Kreymborg wrote:

> Using the asm keyword in C++ code to directly vector interrupts to a
> class handler (as in the CLASS_IRQ macro discussed earlier on this
> list) still leaves the mangled name which avr-gcc subsequently flags
> as a "misspelled signal handler".

Right, that code only checks for the name starting with __vector:

      if (strncmp (attr, "interrupt", strlen ("interrupt")) == 0)
        {
          if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
            {
              warning (0, "%qs appears to be a misspelled interrupt handler",
                       func_name);
...

> The gcc manual provides for a negative warning form "-Wno-" to turn
> off particular warning messages, although I cannot find mention of
> the "misspelled" message.

It is unconditionally generated, rather than controlled by an option
(thas's the first argument 0 to warning() above).

> Is there a way to turn off this message?

Obviously not.  It would have to be added as a regular option then.
This option then also needs to be described.

I've got no idea about GCC's policy regarding adding target-specific
-W options: whether it's allowed at all, and if so, whether there
are specific restrictions to it.

OTOH, I wonder whether it should rather be turned off in a different
way, maybe by an additional attribute.  That way, one wouldn't have to
turn off the safety check globally, but the expansion of the
CLASS_IRQ() macro could instead just turn it off for the respective
instance.  So instead of tagging its vector name with

__attribute__((signal))

it could tag it e.g.

__attribute__((signal,signame_ok))

Opinions?

> If not could I please request the
> option be added during the next build?

To eventually get this done, please start by writing a GCC bug
report for it.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]