Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sequence Point Violation?

Posted on 2007-03-29
2
Medium Priority
?
164 Views
Last Modified: 2010-04-01
Suppose you have a string of bytes, each representing an integer value, and you iterate through them with a pointer.

You have:

unsigned char byte_string[100] = { some values in here }
unsigned char* p = byte_string;

Is it legal to increment p by one of the values in the byte_string like this:

p += *p;

Does that violate the sequence point rule?
0
Comment
Question by:chsalvia
2 Comments
 
LVL 85

Accepted Solution

by:
ozo earned 100 total points
ID: 18820897
As I read the rule, I don't think it does.
0
 
LVL 11

Assisted Solution

by:Deepu Abraham
Deepu Abraham earned 100 total points
ID: 18821696
Good Read
http://en.wikipedia.org/wiki/Sequence_point
Best Regards,
DeepuAbrahamK
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question