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

  • SEARCH
  • Home
  • 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 3217140
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:22:36+00:00 2026-05-17T15:22:36+00:00

As per @Potatoswatter’s suggestion, I have created a new discussion. Reference is this response

  • 0

As per @Potatoswatter’s suggestion, I have created a new discussion.

Reference is this response from @Potatoswatter

Given the code snippet,

int i = 3, &j = i; 
j = ++ i;

The comment which I seek clarity on, is this. (which seems to be an important missing piece in my understanding of the unsequenced evaluation a.k.a sequence point):

@Chubsdad: Even though it’s an alias,
its glvalue evaluation does not
require a glvalue evaluation of i.
Generally speaking, evaluating a
reference does not require the
original object to be on hand.
There’s
no reason it should be UB, so it makes
sense there should be an easy loophole
or transformation to code which is not
UB.

and

The reference doesn’t tell the
compiler to go look at the referenced
variable and get its lvalue, because
it might not know what variable is
referenced. The compiler computes the
lvalue of the reference and that
lvalue identifies an object. If you
want to debate this further, please
open a new question.

Any possible lack of clarity in the question is part of the ‘undefined behavior’ I am going through trying to understand ‘unsequenced evaluation’, ‘sequence point’ etc in C++0x.

  • 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-17T15:22:36+00:00Added an answer on May 17, 2026 at 3:22 pm

    Imagine the following

    int &i = *new int;
    

    If you say that i is an alias for another name – what name? A reference either references an object or function. When you say “glvalue”, you refer to a property of a particular expression, not to a property of an object.

    int i = 0;
    int &ri = i;
    

    Now, i is an lvalue expression and ri is an lvalue expression too (both of the syntactic category id-expression). They name (as found by name-lookup) a reference and an int variable.

    If you now determine the object identity for the ri case, you need to take the reference and make the expression refer to the object it was initialized with. This is called an lvalue evaluation because you determine the property of an lvalue (i.e the referent).

    You need to do the same for the i case. I.e you figure out to what object the lvalue expression i refers to. A glvalue evaluation of ri thus is different than glvalue evaluation of i, despite both of them yielding the same result.

    Rvalue evaluation means to take an lvalue and apply the lvalue to rvalue conversion. In other words, to read a value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As per a website, I have created a simple shell script at--> /etc/init.d/jboss This
As per the instructions, I downloaded ABS 4.1, created a new project from existing
Per a client's request I have written a communication class that inherits from webclient.
Per a great answer from another question I have begun mounting global resources (css/js/images)
Per PDO's fetchAll() method, I have a two-dimensional array of cities from my database
Per this helpful article I have confirmed I have a connection pool leak in
Per this question (see comments near the bottom), I was wondering if anyone knows
Per the code below, I am getting the following message. I am fairly certain
As per question says. Specifically i want the html.beginform() to have the runat=server attribute.
As per http://www.w3schools.com/cssref/sel_last-child.asp When i am trying to apply :last-child for my code, the

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.