- Ursprüngliche Nachricht -
Von: Peter Bigot
Gesendet am: 30 Dez 1899 00:00:00
Well, it's in stdlib as opposed to being in binutils or gcc. And has
nothing to do with hardware multiply being used in the demonstration
program. A one-line program calling printf with a format
I had a function which took a byte argument and returned a byte. From
another file (compiled into a separate object), I called the function
without first declaring it. The calling function used an argument which
evaluated to uint32_t.
In the called function, it looked for the argument in R15.
That's not an ABI problem. Without a declaration available at the point of
call, C mandates that the parameter be assumed to be an int (two bytes). If
you define a function with non-int parameters, you have to have a compatible
declaration in scope wherever it's invoked. Using to mask off
Hi Kim,
On Thu, 7 Oct 2010 08:26:15 -0400
Kim Toms kim.t...@gmail.com wrote:
I had a function which took a byte argument and returned a byte. From
another file (compiled into a separate object), I called the function
without first declaring it. The calling function used an argument which
So does that mean that calling a function which takes an int with a byte
won't work? Or, alternatively, that calling a function with a byte that
expects an int won't work? Because, in my experience that does seem to
work. Maybe I haven't run across the problem in other contexts, though.
I
Sorry, you're right: I read this too quickly.
I don't think it's an ABI problem so much as a compiler problem: it's
actually passing the 32-bit value in registers r14 and r15, instead of
truncating it to an int and passing it in r15, as it's supposed to do when
there's no declaration.
Fine. Yet
On Thu, Oct 7, 2010 at 5:49 AM, JMGross msp...@grossibaer.de wrote:
Thanks for all your work (even if I don't use mspgcc4 as it isn't ready for
critical production environment)
You're welcome. But:
In case somebody reads this and decides to avoid mspgcc4 in favor of a
supposedly
In a recent post, JMGross recently wrote:
...I don't use mspgcc4 as it isn't ready for critical production
environment...
This was timely. I'm about to begin a critical production project using an
MSP430. I was planning on starting with mspgcc4 as the chosen compiler.
If you don't mind my
Third time's the charm? It's been so long since I've dealt with KR C I've
forgotten the rules.
The behavior is correct. char and short are upcast to int when no
declaration is in scope. Integral types that are larger than int are left
as is. That you're masking off all but the low byte does
OK, thanks. Good to know. I'll go back and put a bookmark in my KR :-)
On Thu, Oct 7, 2010 at 2:21 PM, Peter Bigot p...@peoplepowerco.com wrote:
Third time's the charm? It's been so long since I've dealt with KR C I've
forgotten the rules.
The behavior is correct. char and short are
10 matches
Mail list logo