#avr Logs

Jul 13 2020

#avr Calendar

04:37 AM twnqx: cehteh: remember the discussion about bitfields? i actually found one of my rare usecases again :D
04:43 AM twnqx: https://gist.github.com/chrschmidt/57243e9eb8fd17029fb9c2612c1a8374
04:45 AM cehteh: i actually wonder how this can be even potable for libraries when you for example compile a library with another compiler or just other compiler version on the same arch. in practice this works of course compiler vendord dont change the bitfield representation. but when you read the C standards its not guranteed
04:50 AM LeoNerd: I think "portability" when writing AVR code is always an interesting question
05:00 AM twnqx: that one works on amd64/gcc and avr/gcc :P
05:06 AM cehteh: yes in practice its pretty stable and portable, compiuler writers are of course aware of the problems and handle it gently
05:08 AM cehteh: would be nice if if C would define a 'record' macro or something like that which defines packing, alignment and endianess
05:08 AM cehteh: (+ bitfield order)
05:23 AM twnqx: actually, C11 is more precise on packing
05:23 AM twnqx: but not anything else :(
05:25 AM cehteh: i dont care if normal structs are packed and reordered to optimize performance, but some well defined standardized record/message type which is 100% portable on the cost of performance would be nice
04:56 PM strata_ is now known as strata
11:39 PM day_ is now known as day