Topic: comma operator and rvalue conversion


Author: Sandra Loosemore <sandra@shore.net>
Date: 1999/12/07
Raw View
Given

  char arr[100];
  sizeof(0,arr);

What does the sizeof expression return?  The comma operator is
supposed to return an lvalue if the second argument is an lvalue,
which I assume means that array-to-pointer conversion is not performed
either.  But in this case the sizeof expression would return a different
value than in plain C, and there is nothing in Annex C to indicate that
an incompatible change was intended.

-Sandra
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]