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

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

[avr-libc-dev] [bug #26284] boot_lock_fuse_bits_get does not compile und


From: Brad Schick
Subject: [avr-libc-dev] [bug #26284] boot_lock_fuse_bits_get does not compile under gcc 4.3.X
Date: Wed, 22 Apr 2009 07:17:52 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8

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/





reply via email to

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