public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25448]  New: [4.0/4.1/4.2 Regression] Unfounded warnings from the AVR backend
@ 2005-12-16 17:11 berndtrog at yahoo dot com
  2005-12-16 17:13 ` [Bug target/25448] " berndtrog at yahoo dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: berndtrog at yahoo dot com @ 2005-12-16 17:11 UTC (permalink / raw)
  To: gcc-bugs

Hello,

when compiling this code:

   procedure My_int;
   pragma Machine_Attribute (My_int, "signal");
   pragma Export (C, My_int, "__vector_1");
   procedure My_int is begin null; end;

with avr-gcc-4.x I get this warning:

demo_ada.adb:9: warning: `demo_ada__my_int' appears to be a misspelled
signal handler

I do not get this warning with gcc-3.4.x.

IMO, this is caused by the misspelled-signames patch
from Theodore A. Roth:

avr.c:
[...]
{
 const char *func_name = IDENTIFIER_POINTER (DECL_NAME (*node));
 const char *attr = IDENTIFIER_POINTER (name);

 /* If the function has the 'signal' or 'interrupt' attribute, test to
    make sure that the name of the function is "__vector_NN" so as to
    catch when the user misspells the interrupt vector name.  */

 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);
[...]

Ted's patch is a bit too C specific, because it assumes that the source
code function name is equal the symbol name. 
(__vector_1 = __vector_1)

In Ada, the source code function name (demo_ada__my_int) for interrupts is
translated to__vector_xx with the "Pragma Export (..)" statement.
Its not possible to define "__vector_1" as a source code function name.


-- 
           Summary: [4.0/4.1/4.2 Regression] Unfounded warnings from the AVR
                    backend
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: berndtrog at yahoo dot com
GCC target triplet: avr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25448


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-04-05 16:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-16 17:11 [Bug target/25448] New: [4.0/4.1/4.2 Regression] Unfounded warnings from the AVR backend berndtrog at yahoo dot com
2005-12-16 17:13 ` [Bug target/25448] " berndtrog at yahoo dot com
2005-12-25  1:20 ` pinskia at gcc dot gnu dot org
2006-01-08 16:22 ` pinskia at gcc dot gnu dot org
2006-03-11  3:22 ` mmitchel at gcc dot gnu dot org
2007-02-03 16:09 ` [Bug target/25448] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-02-03 17:27 ` jsm28 at gcc dot gnu dot org
2007-02-14  9:37 ` mmitchel at gcc dot gnu dot org
2007-04-05 15:44 ` aesok at gcc dot gnu dot org
2007-04-05 15:50 ` aesok at gcc dot gnu dot org
2007-04-05 15:57 ` aesok at gcc dot gnu dot org
2007-04-05 16:00 ` aesok at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).