[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #24887] boot.h not compatible with -mint8 compiler o
From: |
Ken Krieger |
Subject: |
[avr-libc-dev] [bug #24887] boot.h not compatible with -mint8 compiler option |
Date: |
Thu, 20 Nov 2008 07:41:54 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8 |
URL:
<http://savannah.nongnu.org/bugs/?24887>
Summary: boot.h not compatible with -mint8 compiler option
Project: AVR C Runtime Library
Submitted by: kenk
Submitted on: Thu 20 Nov 2008 07:41:53 AM GMT
Category: Header
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Header files
Status: None
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: 1.6.4
Fixed Release: None
_______________________________________________________
Details:
The case where I am seeing this is in the definitions of boot_page*
functions. In here, a check is done against USHRT_MAX. The value of this can
change depending on the usage of the -mint8 compiler switch (making int
default to be 8-bit sized).
Specifically, the comparison (which I notice) is line 597 of boot.h:
#elif (FLASHEND > USHRT_MAX)
The author intended USHRT_MAX to be == 65535, which it is without -mint8,
with -mint8 it's 255. As a result the wrong functions are instantiated.
A test for this might be worth adding to the regression suite as well.
To reproduce, simply call boot_page_erase() (for instance) using a Mega64
architecture. With -mint8, this fails (looking for RAMPZ) without this switch,
success.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?24887>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avr-libc-dev] [bug #24887] boot.h not compatible with -mint8 compiler option,
Ken Krieger <=