|
From: | David Brown |
Subject: | Re: [avr-libc-dev] Progmem types compatibility |
Date: | Tue, 10 Jan 2012 01:07:55 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
On 09/01/2012 23:42, Joerg Wunsch wrote:
As David Brown wrote:Being able to attach the "progmem" attribute to the type is a useful feature - or it would be, if it were safe to use. The main reason, as I see it, is the same with all type information - it helps improve the safety, static (compile-time) error checking, and self-documenting aspects of code.But as we had to learn, actually just *this* was never the case. So in retrospect, the typedef only gave a false feeling of safety.
A false feeling of safety is better than no feeling of safety :-)Seriously, as long as no incorrect code was being produced, I suppose there was no harm in using the type attribute - at least it helped document the code.
As I understand it, using typedefs with named address spaces should be safe to use. Perhaps Johann can correct me if I'm wrong with this.
Obviously this will be the best situation for the future. mvh., David
[Prev in Thread] | Current Thread | [Next in Thread] |