473,320 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Qualifier "volatile" - probably OT.

On my system (using gcc) I found I need to use the "volatile"
qualifier to limit compiler optimization. I notice that this
qualifier is described in K&R 2nd edition (1988) but not in
K&R 1st edition (1978).

Are there realistically any major C compilers in use today that
don't recognize this qualifier?

Thanks for your help and forbearance.

Regards,
Charles Sullivan

Nov 28 '05 #1
7 1488
Charles Sullivan <cw******@triad.rr.com> writes:
On my system (using gcc) I found I need to use the "volatile"
qualifier to limit compiler optimization. I notice that this
qualifier is described in K&R 2nd edition (1988) but not in
K&R 1st edition (1978).

Are there realistically any major C compilers in use today that
don't recognize this qualifier?


Probably not. At this point, it's probably safe to assume that any C
compiler supports at least the entire C90 standard -- unless you have
a requirement to support very old platforms. You'll still see a fair
amount of code that includes preprocessor tricks to cater to compilers
that don't support function prototypes, but it's probably no longer
necessary. (Even gcc, I believe, no longer supports pre-ANSI hosting
compilers.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 28 '05 #2
Charles Sullivan <cw******@triad.rr.com> wrote:
Are there realistically any major C compilers in use today that
don't recognize this qualifier?


As it is part of the standard, a compiler that does not recognize it
is not strictly a C compiler. Practically, it means that most
anything claiming to be a C compiler these days will support it, with
the possible exception of compilers targetting outdated (or not)
embedded platforms.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 28 '05 #3
On Mon, 28 Nov 2005 23:07:19 +0000, Christopher Benson-Manica wrote:
Charles Sullivan <cw******@triad.rr.com> wrote:
Are there realistically any major C compilers in use today that
don't recognize this qualifier?


As it is part of the standard, a compiler that does not recognize it
is not strictly a C compiler. Practically, it means that most
anything claiming to be a C compiler these days will support it, with
the possible exception of compilers targetting outdated (or not)
embedded platforms.


Thanks Christopher and Keith, your responses were most
appreciated.

Regards,
Charles Sullivan

Nov 29 '05 #4
On 2005-11-28, Keith Thompson <ks***@mib.org> wrote:
Charles Sullivan <cw******@triad.rr.com> writes:
On my system (using gcc) I found I need to use the "volatile"
qualifier to limit compiler optimization. I notice that this
qualifier is described in K&R 2nd edition (1988) but not in
K&R 1st edition (1978).

Are there realistically any major C compilers in use today that
don't recognize this qualifier?


Probably not. At this point, it's probably safe to assume that any C
compiler supports at least the entire C90 standard -- unless you have
a requirement to support very old platforms. You'll still see a fair
amount of code that includes preprocessor tricks to cater to compilers
that don't support function prototypes, but it's probably no longer
necessary. (Even gcc, I believe, no longer supports pre-ANSI hosting
compilers.)


You sure? gcc's a special case, since there's a semi-legitimate need to
compile gcc [an ansi compiler] on a non-ansi system - Is there at least
somewhere one can "build the tools to build the tools" to make gcc, so
to speak, on such platforms?
Nov 29 '05 #5
Jordan Abel <jm****@purdue.edu> writes:
On 2005-11-28, Keith Thompson <ks***@mib.org> wrote:
Charles Sullivan <cw******@triad.rr.com> writes:
On my system (using gcc) I found I need to use the "volatile"
qualifier to limit compiler optimization. I notice that this
qualifier is described in K&R 2nd edition (1988) but not in
K&R 1st edition (1978).

Are there realistically any major C compilers in use today that
don't recognize this qualifier?


Probably not. At this point, it's probably safe to assume that any C
compiler supports at least the entire C90 standard -- unless you have
a requirement to support very old platforms. You'll still see a fair
amount of code that includes preprocessor tricks to cater to compilers
that don't support function prototypes, but it's probably no longer
necessary. (Even gcc, I believe, no longer supports pre-ANSI hosting
compilers.)


You sure? gcc's a special case, since there's a semi-legitimate need to
compile gcc [an ansi compiler] on a non-ansi system - Is there at least
somewhere one can "build the tools to build the tools" to make gcc, so
to speak, on such platforms?


I'm not 100% sure, but I remember reading about it. Older versions of
gcc are still available; if necessary, you can always use a native
pre-ANSI compiler to bootstrap an older gcc, then use the resulting
gcc to bootstrap the most current one.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 29 '05 #6

In article <ln************@nuthaus.mib.org>, Keith Thompson <ks***@mib.org> writes:
Probably not. At this point, it's probably safe to assume that any C
compiler supports at least the entire C90 standard -- unless you have
a requirement to support very old platforms. You'll still see a fair
amount of code that includes preprocessor tricks to cater to compilers
that don't support function prototypes, but it's probably no longer
necessary.


That's probably true for most C developers - I certainly hope that it
is, anyway. But we're still supporting some products in some pre-
standard implementations, due to contractual obligations. (I think
Sinix is one platform where we're still constrained to a pre-standard
implementation.) So there are still some commercial C products being
actively maintained for pre-C90 implementations.

Fortunately, that seems to be quite rare, and I agree with Keith that
it seems to be safe to assume at least C90 as a default.

(I can't wait for the day when we can get rid of those platforms.
However, I see postings from people on comp.lang.cobol who can't use
the 1985 COBOL yet, so they've had four more years of pain. Man with
no feet and all that.)

--
Michael Wojcik mi************@microfocus.com

Reversible CA's are -automorphisms- on shift spaces. It is a notorious
fact in symbolic dynamics that describing such things on a shift of finite
type are -fiendishly- difficult. -- Chris Hillman
Dec 1 '05 #7
On Thu, 01 Dec 2005 14:42:53 +0000, Michael Wojcik wrote:

In article <ln************@nuthaus.mib.org>, Keith Thompson <ks***@mib.org> writes:
Probably not. At this point, it's probably safe to assume that any C
compiler supports at least the entire C90 standard -- unless you have
a requirement to support very old platforms. You'll still see a fair
amount of code that includes preprocessor tricks to cater to compilers
that don't support function prototypes, but it's probably no longer
necessary.


That's probably true for most C developers - I certainly hope that it
is, anyway. But we're still supporting some products in some pre-
standard implementations, due to contractual obligations. (I think
Sinix is one platform where we're still constrained to a pre-standard
implementation.) So there are still some commercial C products being
actively maintained for pre-C90 implementations.

Fortunately, that seems to be quite rare, and I agree with Keith that
it seems to be safe to assume at least C90 as a default.

(I can't wait for the day when we can get rid of those platforms.
However, I see postings from people on comp.lang.cobol who can't use
the 1985 COBOL yet, so they've had four more years of pain. Man with
no feet and all that.)


Thanks Michael, I appreciate your inputs.

Regards,
Charles Sullivan
Dec 2 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

94
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.