[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bugs #8643] Misspelled signal names are not caught by gc
From: |
Theodore A. Roth |
Subject: |
[avr-libc-dev] [bugs #8643] Misspelled signal names are not caught by gcc. |
Date: |
Sun, 28 Nov 2004 23:25:59 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 |
This mail is an automated notification from the bugs tracker
of the project: AVR C Runtime Library.
/**************************************************************************/
[bugs #8643] Latest Modifications:
Changes by:
Theodore A. Roth <address@hidden>
'Date:
Mon 11/29/04 at 04:19 (US/Pacific)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
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".
/**************************************************************************/
[bugs #8643] Full Item Snapshot:
URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=8643>
Project: AVR C Runtime Library
Submitted by: Theodore A. Roth
On: Wed 04/21/04 at 16:51
Category: Header
Severity: 5 - Average
Item Group: None
Resolution: Fixed
Privacy: Public
Assigned to: troth
Originator Email: address@hidden
Status: Closed
Summary: Misspelled signal names are not caught by gcc.
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.
Follow-up Comments
------------------
-------------------------------------------------------
Date: Mon 11/29/04 at 04:19 By: Theodore A. Roth <troth>
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".
-------------------------------------------------------
Date: Wed 05/12/04 at 19:49 By: Theodore A. Roth <troth>
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.
File Attachments
-------------------
-------------------------------------------------------
Date: Wed 05/12/04 at 19:49 Name: gcc-avr-misspelled-sig-1.diff Size: 1.72KB
By: troth
Patch for gcc to generate a warning if the vector name appears to be misspelled.
http://savannah.nongnu.org/bugs/download.php?item_id=8643&item_file_id=1296
-------------------------------------------------------
Date: Fri 04/23/04 at 16:09 Name: avr-libc-misspeeled-sig-5.diff Size: 5.79KB
By: troth
Fix copy/paste error when defining EMPTY_INTERRUPT().
http://savannah.nongnu.org/bugs/download.php?item_id=8643&item_file_id=1230
-------------------------------------------------------
Date: Wed 04/21/04 at 18:30 Name: avr-libc-misspeeled-sig-4.diff Size: 5.79KB
By: troth
Updated version of Dmitry's patch.
http://savannah.nongnu.org/bugs/download.php?item_id=8643&item_file_id=1214
-------------------------------------------------------
Date: Wed 04/21/04 at 16:55 Name: avr-libc-misspeeled-sig-3-dmitry.diff Size:
5.44KB By: troth
Dmitry's proposed patch.
http://savannah.nongnu.org/bugs/download.php?item_id=8643&item_file_id=1212
-------------------------------------------------------
Date: Wed 04/21/04 at 16:53 Name: avr-libc-misspeeled-sig-2.diff Size: 7.54KB
By: troth
Updated to fix some asm problems.
http://savannah.nongnu.org/bugs/download.php?item_id=8643&item_file_id=1211
-------------------------------------------------------
Date: Wed 04/21/04 at 16:51 Name: avr-libc-misspeeled-sig.diff Size: 7.12KB
By: troth
First proposed patch.
http://savannah.nongnu.org/bugs/download.php?item_id=8643&item_file_id=1210
For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=8643>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-dev] [bugs #8643] Misspelled signal names are not caught by gcc.,
Theodore A. Roth <=