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

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

Re: [avr-libc-dev] -mint8 problem with setjmp/longjmp


From: Nils Kristian Strom
Subject: Re: [avr-libc-dev] -mint8 problem with setjmp/longjmp
Date: Fri, 08 Nov 2002 15:26:30 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021018

Joerg Wunsch wrote:

I don't think the fix is quite right.  Syntactically, you cannot
simply replace an integer by a pointer type.

setjmp.h is *broken*. The integer type should never have been there in the first place. A pointer is not - and never will be, an integer.

My fix corrects this obvious flaw in the header, replacing addresses (pointers) with pointers.

How can you argue with that ?


With regards to the inttypes.h file, I do not use this as it is -mint8-broken. As you say, this needs patching for -mint8 compatibility.

This is a different case, as this file is *correct*, but not compatible with -mint8.

Point:
  1. setjmp.h is *broken*, uses unknown-sized integers as pointers.
  2. inttypes.h is *correct*, but not compatible with -mint8.




The -mint8 option gave me 6% code size reduction (source is about 20K lines of code). The *only* problem arising from -mint8 was the broken 'setjmp.h'.


Regards,
  Nils








reply via email to

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