Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6063279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:08:52+00:00 2026-05-23T09:08:52+00:00

In the following type of code is there a sequence point between each variable

  • 0

In the following type of code is there a sequence point between each variable construction, or is the result undefined?

int a = 0;
int b = a++, c = a++;

I wasn’t able to find in the standard a specific reference to a sequence point here. Does that mean it is undefined, or just that I failed in my search? The completion of an expression is a sequence point, but does the above initialization also count?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:08:52+00:00Added an answer on May 23, 2026 at 9:08 am

    I believe behavior is well-defined because of 8[dcl.decl]/3

    Each init-declarator in a declaration is analyzed separately as if it was in a declaration by itself.

    Which is even additionally explained in a footnote as

    A declaration with several declarators is usually equivalent to the corresponding sequence of declarations each with a single
    declarator. That is

    T D1, D2, ... Dn;
    

    is usually equvalent to

    T D1; T D2; ... T Dn;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code throws an compile-time error like Cannot convert type 'string' to 'int'
The following code lists the set of keys found in a dictionary sequence (each
I have come across the following type of code many a times, and I
I have the following code: Type type = typeof(T); foreach (PropertyInfo pi in type.GetProperties(BindingFlags.Public
I am successfully instantiating/automating Visual Studio using the following code: System.Type t = System.Type.GetTypeFromProgID(VisualStudio.DTE.9.0);
the following code specifies a type MyBase64Binary which is derived from a base class
The following code warns about incompatible type. What is the proper way to solve
The following code fails in 'Evaluate' with: This expression was expected to have type
The following code yields an error error: ‘struct Foo’ is not a valid type
I can type in the following code in the terminal, and it works: for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.