avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi()


From: Pertti Kellomäki
Subject: Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi()
Date: Tue, 1 Feb 2005 09:12:49 +0200

1. helmi 2005 kello 01:00, Eric wrote:
So far there haven't been too many others complaining about it.

Since you asked,  here's my data point. I am an academic
planning to go small time into embedded systems, and I have
written a data logging application for the AVR Butterfly.
It uses sbi() and cbi() simply because the examples
I based it on used them. If it ain't broke, don't fix it.

I have been through a variety of languages, so I am perfectly
capable of rewriting my code. However, in this case my fix would
be to redefine sbi() and cbi() privately, as I fail to see the inherent
evil in them. Frankly, to set a bit using a construct whose
stated purpose is to set a bit sounds like a good idea to me.

I understand that the developers want to move forward and
that they want to encourage good programming style. What
I don't quite understand is the seeming resistance to the idea of
moving sbi() and cbi() to obsolete_bit_twiddling_macros.h
and letting them rest in peace there. There is obvious demand
for such support of legacy code, and the cost of providing
the support is trivial. The macros are completely independent,
so retaining them does not break anything.

I have not been complaining, but I do see the complete removal
of sbi() and cbi() as an unnecessary annoyance to be dealt with.
--
Pertti


reply via email to

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