bugAVR C Runtime Library - Bugs: bug #8643, Misspelled signal names are not...

 
 

bug #8643: Misspelled signal names are not caught by gcc.

Submitted by:  Theodore A. Roth <troth>
Submitted on:  Wed 21 Apr 2004 04:51:38 PM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: Theodore A. Roth <troth>Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 29 Nov 2004 04:19:39 AM UTC, comment #2:

Marek has committed my patch for gcc.

GCC >= 4.0 will now generate a warning if a function has either the "interrupt" or "signal" attribute and the name of the function does not start with "__vector".

Theodore A. Roth <troth>In charge of this item.
Wed 12 May 2004 07:49:46 PM UTC, comment #1:

After a bit more thought, I don't really like doing all this magic in the headers to try to catch the problem.

It was actually fairly trivial to teach gcc how to catch this. I've attached a patch for gcc. If it is acceptable, I'll send it upstream to Marek for his comments.

Theodore A. Roth <troth>In charge of this item.
Wed 21 Apr 2004 04:51:38 PM UTC, original submission:

When using the SIGNAL() and INTERRUPT() macros, there is currently no way for gcc to catch when the signal name (the SIG_* defines in the io*.h files) is misspelled. This is a long standing problem.

The core of the problem is that avr-libc defines macros which reference the SIG_* defines to generate special function declarations. These declarations are what lets gcc know that it should generate an interrupt handler function and in turn allows the linker to place a reference to the handler in the interrupt vector table.

When the SIG_* is misspelled in the arg to SIGNAL(), gcc will not give any indication of the mistake, but will just compile it as a regular function and the interrupt vector table will not jump into the handler.

Some possible solutions have been discussed in this thread:

http://mail.gnu.org/archive/html/avr-libc-dev/2004-04/msg00072.html

I'm going to attached the submitted patches to the report so that they don't slip through the cracks.

Theodore A. Roth <troth>In charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #1304:  gcc-avr-misspelled-sig-1.diff added by troth (2KiB - text/x-patch - Patch for gcc to generate a warning if the vector name appears to be misspelled.)
file #1246:  avr-libc-misspeeled-sig-5.diff added by troth (6KiB - text/plain - Fix copy/paste error when defining EMPTY_INTERRUPT().)
file #1230:  avr-libc-misspeeled-sig-4.diff added by troth (6KiB - text/plain - Updated version of Dmitry's patch.)
file #1229:  avr-libc-misspeeled-sig-3-dmitry.diff added by troth (5KiB - text/plain - Dmitry's proposed patch.)
file #1228:  avr-libc-misspeeled-sig-2.diff added by troth (8KiB - text/plain - Updated to fix some asm problems.)
file #1227:  avr-libc-misspeeled-sig.diff added by troth (7KiB - text/plain - First proposed patch.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 12 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 29 Nov 2004 04:19:39 AM UTCtrothStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Wed 12 May 2004 07:49:46 PM UTCtrothAttached File-=>Added gcc-avr-misspelled-sig-1.diff, #1296
Fri 23 Apr 2004 04:10:19 PM UTCtrothAttached File#1229=>Removed
Fri 23 Apr 2004 04:09:39 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig-5.diff, #1230
Fri 23 Apr 2004 04:09:38 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig-5.diff, #1229
Wed 21 Apr 2004 06:30:46 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig-4.diff, #1214
Wed 21 Apr 2004 04:56:17 PM UTCtrothAttached File#1213=>Removed
Wed 21 Apr 2004 04:55:33 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig-3-dmitry.diff, #1213
Wed 21 Apr 2004 04:55:12 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig-3-dmitry.diff, #1212
Wed 21 Apr 2004 04:53:10 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig-2.diff, #1211
Wed 21 Apr 2004 04:51:38 PM UTCtrothAttached File-=>Added avr-libc-misspeeled-sig.diff, #1210

Back to the top


Powered by Savane 3.1-cleanup1