If I have a program:
#include using namespace std; int TestIntReturn(int &x, int &y) { x = 1000; y = 1000; return x+y;
It is discarded; the expression TestInReturn(a,b) is a discarded-value expression. Discarding an int has no effect, but discarding a volatile int (or any other volatile-qualified type) can have the effect of reading from memory.
TestInReturn(a,b)
int
volatile int