On Mon, Oct 13, 2008 at 18:49, Andreas Schwab <[EMAIL PROTECTED]> wrote: > "Ralovich, Kristóf" <[EMAIL PROTECTED]> writes: > >> ---------------------------------------- >> >> int >> main(int argc, char** argv) >> { >> char* d = new char[256, 256]; >> return 0; >> } >> >> ---------------------------------------- >> >> Is this the use of 'placement new' in weird syntax I didn't know >> before, or is this code wrong and accidentally accepted by gcc? In the >> former case, please correct me and sorry for the noise! > > $ gcc -Wunused-value -c new.cc > new.cc: In function 'int main(int, char**)': > new.cc:4: warning: left-hand operand of comma has no effect > > Andreas. > > -- > Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] > SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany > PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." >
Thank you for the fair explanation! I have learned something new today! I am going to find out more about 'operator comma'. BTW -Wunused-value is quite useful! Kristof