[Top][All Lists]

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

[avr-gcc-list] Re: [avr-libc-dev] Constant address to program memory in

From: Shaun Jackman
Subject: [avr-gcc-list] Re: [avr-libc-dev] Constant address to program memory in C
Date: Thu, 22 Nov 2007 13:56:31 -0700

On Nov 22, 2007 1:44 PM, Joerg Wunsch <address@hidden> wrote:
> As Shaun Jackman wrote:
> > The assembler has a pm(a) operator for this very reason. It would be
> > useful for avr-libc to have a similar macro.
> This rather smells like a compiler bug to me, than something where
> library support would be a real help.  If the compiler offers the
> feature to jump to an arbitrary address using "goto", then it's
> responsible to translate that code into whatever is necessary to
> accomplish the goal.  The tools always and only count in byte
> addresses.

I agree. Unfortunately, there's a bunch of code out there now that
assumes goto *x needs to be fixed up with a goto *(x/2). If this is
silently fixed in the compiler, there needs to be a big release note
somehow to inform people that the situation has changed. It could get
really ugly for anyone that, for some reason, has to support compiling
the same code with multiple versions of the compiler.

Considering the above argument, do you think it's a bug that should be
fixed? I think perhaps it should, and if you agree I'll submit a bug
to GCC.


reply via email to

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