URL: <http://savannah.nongnu.org/bugs/?26284>
Summary: boot_lock_fuse_bits_get does not compile under gcc 4.3.X Project: AVR C Runtime Library Submitted by: schickb Submitted on: Wed 22 Apr 2009 07:17:50 AM GMT Category: Library Severity: 3 - Normal Priority: 5 - Normal Item Group: libc code Status: None Percent Complete: 0% Assigned to: None Open/Closed: Open Discussion Lock: Any Release: 1.6.5 Fixed Release: None _______________________________________________________ Details: The 'boot_lock_fuse_bits_get' macro in <avr/boot.h> causes a compile error when passed a non-constant argument. Building the code below in a fairly recent version of GCC (like 4.3.2) produces the error: #include <avr/io.h> #include <avr/boot.h> #include <stdint.h> void main() { uint16_t addr = 0x0003; return boot_lock_fuse_bits_get(addr); } The error will be something like: warning: asm operand 3 probably doesn't match constraints error: impossible constraint in 'asm' The problem seems to be the use of the "M" constraint in the macro. I believe the attached patch should fix the issue, and is a bit simpler as well. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 22 Apr 2009 07:17:50 AM GMT Name: boot_lock_fuse_bits_get.patch Size: 1kB By: schickb <http://savannah.nongnu.org/bugs/download.php?file_id=17992> _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26284> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev