Path: csiph.com!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: alt.os.development Subject: Re: Smaller C Date: Fri, 11 Sep 2015 18:51:39 -0400 Organization: Aioe.org NNTP Server Lines: 28 Message-ID: References: <1debc959-af42-490a-ac12-568e59fa441a@googlegroups.com> <3318542b-e303-4454-bfb0-d4554304de6b@googlegroups.com> <0f114260-625f-4a96-b7df-6a1972525280@googlegroups.com> <94dbee89-6191-4cec-a491-d5ac974a3ffe@googlegroups.com> <77032cbf-7538-42ef-a1ad-73f3ca6ee38d@googlegroups.com> <13fd448e-f885-4785-9368-04c0b75e543c@googlegroups.com> <863a5219-999a-4028-b567-a8e1e282af5d@googlegroups.com> <79c0cfce-38ec-4bcc-bd5f-a25808ffb8ea@googlegroups.com> <39da71f8-7e21-4fcb-84da-263d5c81059f@googlegroups.com> <870c24c2-224c-48e5-9955-fcbe6f67b68c@googlegroups.com> <4837e85f-886b-4db4-8b7e-6005a9f39494@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com alt.os.development:8746 On Fri, 11 Sep 2015 16:32:14 -0400, Benjamin David Lunt wrote: > However, at the moment, and probably for some time, I will not > need anything like that in my OS development, and will probably > not pursue it much further than what I have done so far. At > least not at the moment. I will be interested to see what you > come up with, whenever you do add this functionality to yours. Well, I rarely use any qualifiers. They're generally not needed, if you're a cautious programmer. I've never found a use for 'const'. I've only used 'static' once for convenience. 'volatile' is required once and a while for OS development, e.g., raw screen output or memory mapped device, especially for things outside the control of your code. 'register' was convenient. However, GCC eliminated the ability to use it for file scope variables. That, IMO, was the *PRIMARY* situation where you'd want to use one, e.g., fast global pointers or global counters for your application. Apparently, the GCC maintainers felt that Linux OS coders were abusing 'register' and this prevented registers from being used in OS code. 'register' variables can still be used within procedures, but an 'unsigned char' will typically use a register by default with the C compilers I'm accustomed to. Rod Pemberton -- Just how many texting and calendar apps does humanity need?