Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > volatile in C99

Reply
Thread Tools

volatile in C99

 
 
George
Guest
Posts: n/a
 
      11-29-2008


By trade, I'm a carpenter, and I've been implementing a greener heating
solution for the house I'm flipping including fans that are to be
controlled by an integrated circuit. I expect this solution to help the
house, help the planet, and put more green in my wallet.

It is in the programming for, say, a thermistor, that volatile comes into
play. I thought of doing the whole project in C, which, I thought, was the
best tool for this type of thing. I've now stumbled upon an opinion that
volatile in C99 is not a good thing, and now I have a couple questions.

q1) Is there anybody around with a serious criticism of volatile in C99?

q2) What changed about volatile between C90 and C99?

I have 1256.pdf on my machine now. Thanks for your comment.
--
George

The terrorists are fighting freedom with all their cunning and cruelty
because freedom is their greatest fear - and they should be afraid, because
freedom is on the march.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
Reply With Quote
 
 
 
 
George
Guest
Posts: n/a
 
      11-30-2008
On Fri, 28 Nov 2008 17:14:55 -0700, George wrote:

> By trade, I'm a carpenter, and I've been implementing a greener heating
> solution for the house I'm flipping including fans that are to be
> controlled by an integrated circuit. I expect this solution to help the
> house, help the planet, and put more green in my wallet.
>
> It is in the programming for, say, a thermistor, that volatile comes into
> play. I thought of doing the whole project in C, which, I thought, was the
> best tool for this type of thing. I've now stumbled upon an opinion that
> volatile in C99 is not a good thing, and now I have a couple questions.
>
> q1) Is there anybody around with a serious criticism of volatile in C99?
>
> q2) What changed about volatile between C90 and C99?
>
> I have 1256.pdf on my machine now. Thanks for your comment.


%- >I've been looking at volatile from the C side, and I like the fortran
%- >model, as I understand it in Adams. This is clearly an issue where
fortran
%- >best follows C99.
%-
%- No, it isn't. Fortran VOLATILE is less disgustingly undefined than
%- C volatile, and following that is insane. The latter is currently
%- being touted for use in combination with parallelism (POSIX threads
%- etc.), and the combination simply doesn't work. If you are VERY
%- lucky, your implementation will have extra documentation that says
%- what it actually does, but I have never seen that.
%-
%- I put in a couple of "interpretation requests" on Fortran VOLATILE,
%- to which the standard's editor's response was to make a grimace.
%- They are FOUL. Please ask if you want me to post them.

Would anyone object to the custom quoted text?
--
George

The course of this conflict is not known, yet its outcome is certain.
Freedom and fear, justice and cruelty, have always been at war, and we know
that God is not neutral between them.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
Reply With Quote
 
 
 
 
Kelsey Bjarnason
Guest
Posts: n/a
 
      12-01-2008
[snips]

On Sat, 29 Nov 2008 23:59:19 -0700, George wrote:

> %- I put in a couple of "interpretation requests" on Fortran VOLATILE,
> %- to which the standard's editor's response was to make a grimace. %-
> They are FOUL. Please ask if you want me to post them.
>
> Would anyone object to the custom quoted text?


Probably anyone trying to generate any sort of stats on the group. Or
anyone whose newsreader recognizes the conventional '>' and colourizes,
hides, or otherwise modifies quoted text.

Some compelling reason not to stick with what works?

 
Reply With Quote
 
George
Guest
Posts: n/a
 
      12-01-2008
On Mon, 1 Dec 2008 09:36:25 -0800, Kelsey Bjarnason wrote:

> [snips]
>
> On Sat, 29 Nov 2008 23:59:19 -0700, George wrote:
>
>> %- I put in a couple of "interpretation requests" on Fortran VOLATILE,
>> %- to which the standard's editor's response was to make a grimace. %-
>> They are FOUL. Please ask if you want me to post them.
>>
>> Would anyone object to the custom quoted text?

>
> Probably anyone trying to generate any sort of stats on the group. Or
> anyone whose newsreader recognizes the conventional '>' and colourizes,
> hides, or otherwise modifies quoted text.


I don't know what mean.
>
> Some compelling reason not to stick with what works?


What works?
--
George

I want to thank you for taking time out of your day to come and witness my
hanging.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
return x = 0; // under C99 for volatile x Francois Grieu C Programming 35 01-17-2010 09:58 AM
I don't find the keyword "volatile" in C99.............. lostlander C Programming 3 09-19-2007 11:35 AM
Difference between "library parts" of C99 and "language parts" of C99 albert.neu@gmail.com C Programming 3 03-31-2007 08:14 PM
C99 struct initialization (C99/gcc) jilerner@yahoo.com C Programming 3 02-20-2006 04:41 AM
Use of the Volatile keyword for a pointer to a volatile memory block ben C Programming 5 01-11-2005 05:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57