[En-Nut-Discussion] Printing of 64bit integers

Bob Wirka bobwirka at yahoo.com
Tue Sep 17 18:31:49 CEST 2013

Back to va_list alignment: I found that 8 byte values are placed at offsets (from the start of the list) that are multiples of 8 starting at 0 for sprintf(), and at 4 for printf().

It would seem to me that you need to know 1) which alignment you're working with, and 2) whether you're at an 8 byte offset from the base of the va_list.

The value of 'ap' could be on any 4 byte boundary, depending on the value of the stack pointer when printf() or sprintf() are called.


Bob Wirka
Realtime Control Works
Janesville, WI

 From: Bob Wirka <bobwirka at yahoo.com>
To: Ethernut User Chat (English) <en-nut-discussion at egnite.de> 
Sent: Tuesday, September 17, 2013 10:42 AM
Subject: Re: [En-Nut-Discussion] Printing of 64bit integers

I've done a work around as well. One issue I found is that the va list alignment for printf and sprintf are different because sprintf passes an additional parameter.


Bob Wirka

Sent from Yahoo! Mail on Android


More information about the En-Nut-Discussion mailing list