what are sequence points in c
any pointers to some resource which explains them in detail will be of
much help...
Thanks in advance
kind regards
Rahul 18 3369 ra************* ******@gmail.co m said:
what are sequence points in c
They are points within your program at which it is guaranteed that
everything that should have happened (and in particular all the side
effects) up till this point /has/ happened (or won't ever happen!). You get
them at the end of expression statements, and at various other places as
well.
any pointers to some resource which explains them in detail will be of
much help...
See "C: A Reference Manual", by Harbison & Steele. My 4th edition carries a
reasonable explanation on p83, and again on pages 228-229.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
On Oct 12, 2:13 pm, Richard Heathfield <inva...@invali d.invalid>
wrote:
any pointers to some resource which explains them in detail will be of
much help...See "C: A Reference Manual", by Harbison & Steele. My 4th edition carries a
reasonable explanation on p83, and again on pages 228-229.
Your book "C Unleashed"? I like it very much. Thanks! ;-)
Cong Wang said:
>
On Oct 12, 2:13 pm, Richard Heathfield <inva...@invali d.invalid>
wrote:
any pointers to some resource which explains them in detail will be of
much help...See "C: A Reference Manual", by Harbison & Steele. My 4th
edition carries a
reasonable explanation on p83, and again on pages 228-229.
Your book "C Unleashed"? I like it very much. Thanks! ;-)
You're welcome. I'm glad you're enjoying it.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Richard Heathfield <in*****@invali d.invalidwrote:
("them" equals "sequence points")
any pointers to some resource which explains them in detail will be of
much help...
See "C: A Reference Manual", by Harbison & Steele. My 4th edition carries a
reasonable explanation on p83, and again on pages 228-229.
Or, alternatively, OP can get the "from the horse's mouth" explanation
from 5.1.2.3, subparagraph 2, in the draft n869 standard. (OP can,
presumably, use Google to locate this document.)
--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gma il.com | don't, I need to know. Flames welcome.
Christopher Benson-Manica said:
Richard Heathfield <in*****@invali d.invalidwrote:
>See "C: A Reference Manual", by Harbison & Steele. My 4th edition carries a reasonable explanation on p83, and again on pages 228-229.
Or, alternatively, OP can get the "from the horse's mouth" explanation
from 5.1.2.3, subparagraph 2, in the draft n869 standard. (OP can,
presumably, use Google to locate this document.)
Yes, but ISO Standards tend to make lousy tutorials. :-)
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
In article <_o************ *************** ***@bt.com>,
Richard Heathfield <in*****@invali d.invalidwrote:
>Yes, but ISO Standards tend to make lousy tutorials. :-)
I've always found ISO 8859-1 quite understandable.
-- Richard
Christopher Benson-Manica wrote:
Richard Heathfield <in*****@invali d.invalidwrote:
("them" equals "sequence points")
>>any pointers to some resource which explains them in detail will be of much help...
>See "C: A Reference Manual", by Harbison & Steele. My 4th edition carries a reasonable explanation on p83, and again on pages 228-229.
Or, alternatively, OP can get the "from the horse's mouth" explanation
from 5.1.2.3, subparagraph 2, in the draft n869 standard. (OP can,
presumably, use Google to locate this document.)
There is now a link to a copy of it on the CLC wiki. I used the way back
machine to find Dan Pop's copy and uploaded it to my site. If Dan
objects (which I think is unlikely) I can remove it. Links to that and
other versions of the standard are here http://clc-wiki.net/wiki/c_standard
P.S. Anyone know how Dan is doing?
--
Flash Gordon
Hosting the CLC Wiki on an actively maintained server as a repayment for
all I've learnt here.
All contributions to the Wiki are welcome.
Flash Gordon wrote:
>
.... snip ...
>
P.S. Anyone know how Dan is doing?
I've asked a few times and heard zip-a-dee-doo-dah. Seems ominous.
--
Some informative links:
<news:news.anno unce.newusers
<http://www.geocities.c om/nnqweb/>
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html >
<http://www.netmeister. org/news/learn2quote.htm l>
<http://cfaj.freeshell. org/google/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dave Theese |
last post by:
Hello all,
I have read the definition of a sequence point in the standard and can
follow it mechanically, but for some reason, I'm having a hard time grasping
the conceptual meaning and significance. Can someone out there offer good
intuition on sequence points???
Thank you!
Dave
|
by: Sensorflo |
last post by:
After browsing though many newsgroups articels I'm still not shure how
operator precedence, operator associativity, sequence points, side
effects go together. Currently I have the following view:
An expression
a = b() + c() * d++;
can be transformed with the rules of operator associativity and
operator precedence into a tree
|
by: Timothy Madden |
last post by:
Hello
I've read a long time ago in the MSDN that C++ language defines no sequence
points
Now I read in the 1998 ISO standard a small list of sequence points in C++
Does C++ defines sequence points ? It really should if anyone asks me ...
Thank you
Timothy Madden
|
by: Deniz Bahar |
last post by:
I know the basic definition of a sequence point (point where all side
effects guaranteed to be finished), but I am confused about this
statement:
"Between the previous and next sequence point an object shall have its
stored value modified at most once by the evaluation of an expression.
Furthermore, the prior value shall be accessed only to determine the
value to be stored."
Can someone give me examples of expressions that "barely"...
|
by: akarl |
last post by:
Hi all,
Why do I get a warning from gcc with the following program?
$ cat test.c
#include <stdio.h>
int f(int n)
{
return n;
| |
by: John Smith |
last post by:
I've been playing with splint, which returns the following
warning for the code below:
statlib.c: (in function log_norm_pdf)
statlib.c(1054,31): Expression has undefined behavior (left
operand uses errno,
modified by right operand): (log(x) - mu) * (log(x) - mu)
Code has unspecified behavior. Order of evaluation of function
parameters or
subexpressions is not defined, so if a value is used and
|
by: lovecreatesbea... |
last post by:
---quoting---
Annex C (informative) Sequence points
1 The following are the sequence points described in 5.1.2.3:
- The end of a full expression: an initializer (6.7.8); the
expression in an expression statement (6.8.3); ...
---quoting ends---
What does a full expression exactly mean?
|
by: Daniel Kraft |
last post by:
Hi all!
I do not have a standard-document right next to me to cite from, but as
far as I know, doing something like:
a()=b()=c()=d();
or
foo(d()+c()+b()+a());
has a fixed evaluation order (right-to-left in the first case and
|
by: joe |
last post by:
Consider the following program:
include <iostream>
class Bar
{ public:
int getData9() { m_data = 9; return m_data;}
int getData11() { m_data = 11; return m_data;}
int m_data;
|
by: Jrdman |
last post by:
hi
According to the standard these are how we define sequence points:
*the call to a function ,after the arguments have been evaluated
*the end of the first operand of the following operators :
{logical AND :&&
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |